Top Description Methods
com.googlecode.javaewah32

pack-priv Interface Buffer32

Known Direct Implementers
com.googlecode.javaewah32.IntArray, com.googlecode.javaewah32.IntBufferWrapper

Buffer interface. Users should not be concerned by this class.
Author
Gregory Ssi-Yan-Kai

Method Summary

Modifier and TypeMethod and Description
public void
andLastWord(int mask)

Replaces the last word position in the buffer with its bitwise-and with the given mask.

public void
andWord(int position, int mask)

Replaces the word at the given position in the buffer with its bitwise-and with the given mask.

public void
clear()

Resets the buffer The buffer is not fully cleared and any new set operations should overwrite stale data

public Buffer32
clone()

Creates and returns a copy of the buffer

public void
collapse(int
the position of the buffer where to add words
position
,
int
the number of words to add
length
)

Removes a given number of words at the given position in the buffer.

public void
ensureCapacity(int capacity)

Increases the size of the buffer if necessary

public void
expand(int
the position of the buffer where to add words
position
,
int
the number of words to add
length
)

Expands the buffer by adding the given number of words at the given position.

public int

Returns:

the last word
getLastWord
()

Returns the last word of the buffer

public int

Returns:

the word
getWord
(int position)

Returns the word at a given position

public void
negateWord(int position)

Negates the word at the given position in the buffer

public void
negative_push_back(Buffer32
the buffer
buffer
,
int
the position of the first word to add
start
,
int
the number of words to add
number
)

Same as push_back, but the words are negated.

public void
orLastWord(int mask)

Replaces the last word position in the buffer with its bitwise-or with the given mask.

public void
orWord(int position, int mask)

Replaces the word at the given position in the buffer with its bitwise-or with the given mask.

public void
push_back(int word)

Appends the specified word to the end of the buffer

public void
push_back(Buffer32
the buffer
buffer
,
int
the position of the first word to add
start
,
int
the number of words to add
number
)

Appends the specified buffer words to the end of the buffer.

public void
removeLastWord()

Removes the last word from the buffer

public void
setLastWord(int word)

Replaces the last word in the buffer with the specified word.

public void
setWord(int position, int word)

Replaces the word at the given position in the buffer with the specified word.

public int
sizeInWords()

Returns the actual size in words

public void
swap(Buffer32
buffer to swap with
other
)

Swap the content of the buffer with another.

public void
trim()

Reduces the internal buffer to its minimal allowable size.

Method Detail

andLastWordback to summary
public void andLastWord(int mask)

Replaces the last word position in the buffer with its bitwise-and with the given mask.

andWordback to summary
public void andWord(int position, int mask)

Replaces the word at the given position in the buffer with its bitwise-and with the given mask.

clearback to summary
public void clear()

Resets the buffer The buffer is not fully cleared and any new set operations should overwrite stale data

cloneback to summary
public Buffer32 clone() throws CloneNotSupportedException

Creates and returns a copy of the buffer

collapseback to summary
public void collapse(int position, int length)

Removes a given number of words at the given position in the buffer. The freed words at the end of the buffer are properly cleaned.

Parameters
position:int

the position of the buffer where to add words

length:int

the number of words to add

ensureCapacityback to summary
public void ensureCapacity(int capacity)

Increases the size of the buffer if necessary

expandback to summary
public void expand(int position, int length)

Expands the buffer by adding the given number of words at the given position. The added words may contain stale data.

Parameters
position:int

the position of the buffer where to add words

length:int

the number of words to add

getLastWordback to summary
public int getLastWord()

Returns the last word of the buffer

Returns:int

the last word

getWordback to summary
public int getWord(int position)

Returns the word at a given position

Returns:int

the word

negateWordback to summary
public void negateWord(int position)

Negates the word at the given position in the buffer

negative_push_backback to summary
public void negative_push_back(Buffer32 buffer, int start, int number)

Same as push_back, but the words are negated.

Parameters
buffer:Buffer32

the buffer

start:int

the position of the first word to add

number:int

the number of words to add

orLastWordback to summary
public void orLastWord(int mask)

Replaces the last word position in the buffer with its bitwise-or with the given mask.

orWordback to summary
public void orWord(int position, int mask)

Replaces the word at the given position in the buffer with its bitwise-or with the given mask.

push_backback to summary
public void push_back(int word)

Appends the specified word to the end of the buffer

push_backback to summary
public void push_back(Buffer32 buffer, int start, int number)

Appends the specified buffer words to the end of the buffer.

Parameters
buffer:Buffer32

the buffer

start:int

the position of the first word to add

number:int

the number of words to add

removeLastWordback to summary
public void removeLastWord()

Removes the last word from the buffer

setLastWordback to summary
public void setLastWord(int word)

Replaces the last word in the buffer with the specified word.

setWordback to summary
public void setWord(int position, int word)

Replaces the word at the given position in the buffer with the specified word.

sizeInWordsback to summary
public int sizeInWords()

Returns the actual size in words

swapback to summary
public void swap(Buffer32 other)

Swap the content of the buffer with another.

Parameters
other:Buffer32

buffer to swap with

trimback to summary
public void trim()

Reduces the internal buffer to its minimal allowable size. This can free memory.