Package it.unimi.di.big.mg4j.document
Class AbstractDocumentFactory
- java.lang.Object
-
- it.unimi.di.big.mg4j.document.AbstractDocumentFactory
-
- All Implemented Interfaces:
DocumentFactory
,FlyweightPrototype<DocumentFactory>
,Serializable
- Direct Known Subclasses:
CompositeDocumentFactory
,PropertyBasedDocumentFactory
,ReplicatedDocumentFactory
,SubDocumentFactory
,TRECHeaderDocumentFactory
,WikipediaDocumentSequence.WikipediaHeaderFactory
,ZipDocumentCollection.ZipFactory
public abstract class AbstractDocumentFactory extends Object implements DocumentFactory
An abstract implementation of a factory, providing a protected method to check for field indices.- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface it.unimi.di.big.mg4j.document.DocumentFactory
DocumentFactory.FieldType
-
-
Constructor Summary
Constructors Constructor Description AbstractDocumentFactory()
-
Method Summary
Modifier and Type Method Description protected void
ensureFieldIndex(int index)
Checks that the index is correct (between 0, inclusive, andDocumentFactory.numberOfFields()
, exclusive), and throws anIndexOutOfBoundsException
if the index is not correct.String
toString()
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface it.unimi.di.big.mg4j.document.DocumentFactory
copy, fieldIndex, fieldName, fieldType, getDocument, numberOfFields
-
-
-
-
Method Detail
-
ensureFieldIndex
protected void ensureFieldIndex(int index)
Checks that the index is correct (between 0, inclusive, andDocumentFactory.numberOfFields()
, exclusive), and throws anIndexOutOfBoundsException
if the index is not correct.- Parameters:
index
- the index to be checked.
-
-