otis 2003/01/06 20:49:20 Modified: src/java/org/apache/lucene/document Document.java Log: - Formatting. Revision Changes Path 1.6 +7 -14 jakarta-lucene/src/java/org/apache/lucene/document/Document.java Index: Document.java =================================================================== RCS file: /home/cvs/jakarta-lucene/src/java/org/apache/lucene/document/Document.java,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- Document.java 7 Jan 2003 02:29:21 -0000 1.5 +++ Document.java 7 Jan 2003 04:49:20 -0000 1.6 @@ -144,24 +144,19 @@ * @param name the name of the field * @return a <code>Field[]</code> array */ - public final Field[] getFields(String name) - { + public final Field[] getFields(String name) { List tempFieldList = new ArrayList(); - for (DocumentFieldList list = fieldList; list != null; list = list.next) - { - if (list.field.name().equals(name)) - { + for (DocumentFieldList list = fieldList; list != null; list = list.next) { + if (list.field.name().equals(name)) { tempFieldList.add(list.field); } } int fieldCount = tempFieldList.size(); if (fieldCount == 0) return null; - else - { + else { Field[] fields = new Field[fieldCount]; - for (int i = 0; i < fieldCount; i++) - { + for (int i = 0; i < fieldCount; i++) { fields[i] = (Field) tempFieldList.get(i); } return fields; @@ -174,14 +169,12 @@ * @param name the name of the field * @return a <code>String[]</code> of field values */ - public final String[] getValues(String name) - { + public final String[] getValues(String name) { Field[] namedFields = getFields(name); if (namedFields == null) return null; String[] values = new String[namedFields.length]; - for (int i = 0; i < namedFields.length; i++) - { + for (int i = 0; i < namedFields.length; i++) { values[i] = namedFields[i].stringValue(); } return values;
-- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>