org.apache.lucene.index
Class FieldInfos

java.lang.Object
  extended by org.apache.lucene.index.FieldInfos
All Implemented Interfaces:
Iterable<FieldInfo>

public class FieldInfos
extends Object
implements Iterable<FieldInfo>

Collection of FieldInfos (accessible by number or by name).

WARNING: This API is experimental and might change in incompatible ways in the next release.

Constructor Summary
FieldInfos(FieldInfo[] infos)
           
 
Method Summary
 FieldInfo fieldInfo(int fieldNumber)
          Return the fieldinfo object referenced by the fieldNumber.
 FieldInfo fieldInfo(String fieldName)
          Return the fieldinfo object referenced by the field name
 boolean hasDocValues()
           
 boolean hasFreq()
          Returns true if any fields have freqs
 boolean hasNorms()
           
 boolean hasProx()
          Returns true if any fields have positions
 boolean hasVectors()
           
 Iterator<FieldInfo> iterator()
          Returns an iterator over all the fieldinfo objects present, ordered by ascending field number
 int size()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FieldInfos

public FieldInfos(FieldInfo[] infos)
Method Detail

hasFreq

public boolean hasFreq()
Returns true if any fields have freqs


hasProx

public boolean hasProx()
Returns true if any fields have positions


hasVectors

public boolean hasVectors()
Returns:
true if at least one field has any vectors

hasNorms

public boolean hasNorms()
Returns:
true if at least one field has any norms

hasDocValues

public boolean hasDocValues()
Returns:
true if at least one field has doc values

size

public int size()
Returns:
number of fields

iterator

public Iterator<FieldInfo> iterator()
Returns an iterator over all the fieldinfo objects present, ordered by ascending field number

Specified by:
iterator in interface Iterable<FieldInfo>

fieldInfo

public FieldInfo fieldInfo(String fieldName)
Return the fieldinfo object referenced by the field name

Returns:
the FieldInfo object or null when the given fieldName doesn't exist.

fieldInfo

public FieldInfo fieldInfo(int fieldNumber)
Return the fieldinfo object referenced by the fieldNumber.

Parameters:
fieldNumber -
Returns:
the FieldInfo object or null when the given fieldNumber doesn't exist.


Copyright © 2000-2012 Apache Software Foundation. All Rights Reserved.