SOLR-359 -- changing formatting (2 spaces, each enum value on a single line)

git-svn-id: https://svn.apache.org/repos/asf/lucene/solr/trunk@608152 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Ryan McKinley 2008-01-02 17:21:53 +00:00
parent 3a726d0b6d
commit 1517b93d2b
1 changed files with 43 additions and 36 deletions

View File

@ -1,43 +1,50 @@
package org.apache.solr.common.luke;
/**
* The FieldFlag class is used to store
*
**/
* @version $Id: AdminHandlers.java 608150 2008-01-02 17:15:30Z ryan $
* @since solr 1.3
*/
public enum FieldFlag {
INDEXED('I', "Indexed"), TOKENIZED('T', "Tokenized"), STORED('S', "Stored"), MULTI_VALUED('M', "Multivalued"),
TERM_VECTOR_STORED('V', "TermVector Stored"), TERM_VECTOR_OFFSET('o', "Store Offset With TermVector"),
TERM_VECTOR_POSITION('p', "Store Position With TermVector"),
OMIT_NORMS('O', "Omit Norms"), LAZY('L', "Lazy"), BINARY('B', "Binary"), COMPRESSED('C', "Compressed"),
SORT_MISSING_FIRST('f', "Sort Missing First"), SORT_MISSING_LAST('l', "Sort Missing Last");
INDEXED('I', "Indexed"),
TOKENIZED('T', "Tokenized"),
STORED('S', "Stored"),
MULTI_VALUED('M', "Multivalued"),
TERM_VECTOR_STORED('V', "TermVector Stored"),
TERM_VECTOR_OFFSET('o', "Store Offset With TermVector"),
TERM_VECTOR_POSITION('p', "Store Position With TermVector"),
OMIT_NORMS('O', "Omit Norms"),
LAZY('L', "Lazy"),
BINARY('B', "Binary"),
COMPRESSED('C', "Compressed"),
SORT_MISSING_FIRST('f', "Sort Missing First"),
SORT_MISSING_LAST('l', "Sort Missing Last");
private char abbreviation;
private String display;
private final char abbreviation;
private final String display;
FieldFlag(char abbreviation, String display) {
this.abbreviation = abbreviation;
this.display = display;
this.display.intern();//QUESTION: Need we bother here?
}
public static FieldFlag getFlag(char abbrev){
FieldFlag result = null;
FieldFlag [] vals = FieldFlag.values();
for (int i = 0; i < vals.length; i++) {
if (vals[i].getAbbreviation() == abbrev){
result = vals[i];
break;
}
}
return result;
}
public char getAbbreviation() {
return abbreviation;
}
public String getDisplay() {
return display;
}
FieldFlag(char abbreviation, String display) {
this.abbreviation = abbreviation;
this.display = display;
this.display.intern();//QUESTION: Need we bother here?
}
public static FieldFlag getFlag(char abbrev){
FieldFlag result = null;
FieldFlag [] vals = FieldFlag.values();
for (int i = 0; i < vals.length; i++) {
if (vals[i].getAbbreviation() == abbrev){
result = vals[i];
break;
}
}
return result;
}
public char getAbbreviation() {
return abbreviation;
}
public String getDisplay() {
return display;
}
}