From 1517b93d2b02314e293f46fe9d7a543a8d0699e5 Mon Sep 17 00:00:00 2001 From: Ryan McKinley Date: Wed, 2 Jan 2008 17:21:53 +0000 Subject: [PATCH] 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 --- .../apache/solr/common/luke/FieldFlag.java | 79 ++++++++++--------- 1 file changed, 43 insertions(+), 36 deletions(-) diff --git a/src/java/org/apache/solr/common/luke/FieldFlag.java b/src/java/org/apache/solr/common/luke/FieldFlag.java index a5e37e6140e..5d6668d7dbb 100644 --- a/src/java/org/apache/solr/common/luke/FieldFlag.java +++ b/src/java/org/apache/solr/common/luke/FieldFlag.java @@ -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; + } +}