gnu.lists

Class U16Vector

public class U16Vector extends SimpleVector implements Externalizable, Comparable

Simple adjustable-length vector of unsigned 16-bit integers (shorts).
Constructor Summary
U16Vector()
U16Vector(int size, short value)
U16Vector(int size)
U16Vector(short[] data)
U16Vector(Sequence seq)
Method Summary
protected voidclearBuffer(int start, int count)
intcompareTo(Object obj)
booleanconsumeNext(int ipos, Consumer out)
voidconsumePosRange(int iposStart, int iposEnd, Consumer out)
Objectget(int index)
protected ObjectgetBuffer()
ObjectgetBuffer(int index)
intgetBufferLength()
Get the allocated length of the data buffer.
intgetElementKind()
StringgetTag()
intintAtBuffer(int index)
voidreadExternal(ObjectInput in)
ObjectsetBuffer(int index, Object value)
voidsetBufferLength(int length)
voidsetShortAt(int index, short value)
voidsetShortAtBuffer(int index, short value)
shortshortAt(int index)
shortshortAtBuffer(int index)
voidwriteExternal(ObjectOutput out)

Constructor Detail

U16Vector

public U16Vector()

U16Vector

public U16Vector(int size, short value)

U16Vector

public U16Vector(int size)

U16Vector

public U16Vector(short[] data)

U16Vector

public U16Vector(Sequence seq)

Method Detail

clearBuffer

protected void clearBuffer(int start, int count)

compareTo

public int compareTo(Object obj)

consumeNext

public boolean consumeNext(int ipos, Consumer out)

consumePosRange

public void consumePosRange(int iposStart, int iposEnd, Consumer out)

get

public final Object get(int index)

getBuffer

protected Object getBuffer()

getBuffer

public final Object getBuffer(int index)

getBufferLength

public int getBufferLength()
Get the allocated length of the data buffer.

getElementKind

public int getElementKind()

getTag

public String getTag()

intAtBuffer

public final int intAtBuffer(int index)

readExternal

public void readExternal(ObjectInput in)

setBuffer

public Object setBuffer(int index, Object value)

setBufferLength

public void setBufferLength(int length)

setShortAt

public final void setShortAt(int index, short value)

setShortAtBuffer

public final void setShortAtBuffer(int index, short value)

shortAt

public final short shortAt(int index)

shortAtBuffer

public final short shortAtBuffer(int index)

writeExternal

public void writeExternal(ObjectOutput out)

Serial Data: Write 'size' (using writeInt), followed by 'size' elements in order (using writeShort).