Package org.terrier.structures.postings
Class BlockFieldORIterablePosting
- java.lang.Object
-
- org.terrier.structures.postings.IterablePostingImpl
-
- org.terrier.structures.postings.ORIterablePosting
-
- org.terrier.structures.postings.FieldORIterablePosting
-
- org.terrier.structures.postings.BlockFieldORIterablePosting
-
- All Implemented Interfaces:
java.io.Closeable
,java.lang.AutoCloseable
,BlockPosting
,FieldPosting
,IterablePosting
,Posting
public class BlockFieldORIterablePosting extends FieldORIterablePosting implements BlockPosting
ORIterablePosting implementation that implements FieldPosting and BlockPosting- Since:
- 3.5
- Author:
- Craig Macdonald
-
-
Field Summary
-
Fields inherited from interface org.terrier.structures.postings.IterablePosting
END_OF_LIST, EOL
-
-
Constructor Summary
Constructors Constructor Description BlockFieldORIterablePosting(IterablePosting[] ips)
Constructs an instance of the BlockFieldORIterablePosting
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
addPosting(Posting p)
WritablePosting
asWritablePosting()
Copy this posting to one free of an iterator.protected void
firstPosting(Posting p)
int[]
getPositions()
Return the positions of occurrences of the term in the current document.-
Methods inherited from class org.terrier.structures.postings.FieldORIterablePosting
getFieldFrequencies, getFieldLengths, setFieldLengths
-
Methods inherited from class org.terrier.structures.postings.ORIterablePosting
close, endOfPostings, getDocumentLength, getFrequency, getId, mergePostings, next, next
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.terrier.structures.postings.Posting
getDocumentLength, getFrequency, getId, setId
-
-
-
-
Constructor Detail
-
BlockFieldORIterablePosting
public BlockFieldORIterablePosting(IterablePosting[] ips) throws java.io.IOException
Constructs an instance of the BlockFieldORIterablePosting- Parameters:
ips
-- Throws:
java.io.IOException
-
-
Method Detail
-
getPositions
public int[] getPositions()
Description copied from interface:BlockPosting
Return the positions of occurrences of the term in the current document.- Specified by:
getPositions
in interfaceBlockPosting
- Returns:
- the positions of occurrences of the term in the current document.
-
addPosting
protected void addPosting(Posting p)
- Overrides:
addPosting
in classFieldORIterablePosting
-
firstPosting
protected void firstPosting(Posting p)
- Overrides:
firstPosting
in classFieldORIterablePosting
-
asWritablePosting
public WritablePosting asWritablePosting()
Description copied from class:ORIterablePosting
Copy this posting to one free of an iterator. Kind of like a clone.- Specified by:
asWritablePosting
in interfacePosting
- Overrides:
asWritablePosting
in classFieldORIterablePosting
- Returns:
- an identical posting, but which can be manipulated free of this iterator
-
-