|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.googlecode.javaewah.IteratingBufferedRunningLengthWord
public final class IteratingBufferedRunningLengthWord
Mostly for internal use. Similar to BufferedRunningLengthWord, but automatically advances to the next BufferedRunningLengthWord as words are discarded.
Constructor Summary | |
---|---|
IteratingBufferedRunningLengthWord(EWAHCompressedBitmap bitmap)
Instantiates a new iterating buffered running length word. |
|
IteratingBufferedRunningLengthWord(EWAHIterator iterator)
Instantiates a new iterating buffered running length word. |
Method Summary | |
---|---|
IteratingBufferedRunningLengthWord |
clone()
|
void |
discardFirstWords(long x)
Discard first words, iterating to the next running length word if needed. |
void |
discardRunningWords()
Discard all running words |
void |
discharge(BitmapStorage container)
Write out the remaining words |
long |
discharge(BitmapStorage container,
long max)
Write out up to max words, returns how many were written |
void |
dischargeAsEmpty(BitmapStorage container)
Write out the remain words, transforming them to zeroes. |
long |
dischargeNegated(BitmapStorage container,
long max)
Write out up to max words (negated), returns how many were written |
long |
getLiteralWordAt(int index)
Get the nth literal word for the current running length word |
int |
getNumberOfLiteralWords()
Gets the number of literal words for the current running length word. |
boolean |
getRunningBit()
Gets the running bit. |
long |
getRunningLength()
Gets the running length. |
boolean |
next()
Move to the next RunningLengthWord |
long |
size()
Size in uncompressed words of the current running length word. |
void |
writeLiteralWords(int numWords,
BitmapStorage container)
write the first N literal words to the target bitmap. |
void |
writeNegatedLiteralWords(int numWords,
BitmapStorage container)
write the first N literal words (negated) to the target bitmap. |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public IteratingBufferedRunningLengthWord(EWAHIterator iterator)
iterator
- iteratorpublic IteratingBufferedRunningLengthWord(EWAHCompressedBitmap bitmap)
bitmap
- over which we want to iterateMethod Detail |
---|
public void discardFirstWords(long x)
discardFirstWords
in interface IteratingRLW
x
- the number of words to be discardedpublic void discardRunningWords()
IteratingRLW
discardRunningWords
in interface IteratingRLW
public boolean next()
next
in interface IteratingRLW
public long discharge(BitmapStorage container, long max)
container
- target for writesmax
- maximal number of writes
public long dischargeNegated(BitmapStorage container, long max)
container
- target for writesmax
- maximal number of writes
public void dischargeAsEmpty(BitmapStorage container)
container
- target for writespublic void discharge(BitmapStorage container)
container
- target for writespublic long getLiteralWordAt(int index)
getLiteralWordAt
in interface IteratingRLW
index
- zero based index
public int getNumberOfLiteralWords()
getNumberOfLiteralWords
in interface IteratingRLW
public boolean getRunningBit()
getRunningBit
in interface IteratingRLW
public long getRunningLength()
getRunningLength
in interface IteratingRLW
public long size()
size
in interface IteratingRLW
public void writeLiteralWords(int numWords, BitmapStorage container)
numWords
- number of words to be writtencontainer
- where we writepublic void writeNegatedLiteralWords(int numWords, BitmapStorage container)
numWords
- number of words to be writtencontainer
- where we writepublic IteratingBufferedRunningLengthWord clone() throws CloneNotSupportedException
clone
in interface IteratingRLW
clone
in class Object
CloneNotSupportedException
- this should not be thrown in theory
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |