public abstract class SimpleVector extends AbstractSequence implements Sequence, Array
| Modifier and Type | Field and Description |
|---|---|
int |
size
The (current) number of elements.
|
ATTRIBUTE_VALUE, BOOLEAN_VALUE, CDATA_VALUE, CHAR_VALUE, COMMENT_VALUE, DOCUMENT_VALUE, DOUBLE_VALUE, ELEMENT_VALUE, EOF_VALUE, eofValue, FLOAT_VALUE, INT_S16_VALUE, INT_S32_VALUE, INT_S64_VALUE, INT_S8_VALUE, INT_U16_VALUE, INT_U32_VALUE, INT_U64_VALUE, INT_U8_VALUE, OBJECT_VALUE, PRIM_VALUE, PROCESSING_INSTRUCTION_VALUE, TEXT_BYTE_VALUE| Constructor and Description |
|---|
SimpleVector() |
| Modifier and Type | Method and Description |
|---|---|
void |
add(int index,
java.lang.Object o)
See java.util.List.
|
boolean |
add(java.lang.Object o)
See java.util.Collection.
|
boolean |
addAll(int index,
java.util.Collection c)
See java.util.Collection.
|
protected int |
addPos(int ipos,
java.lang.Object value)
Add a value at a specified Pos.
|
void |
clear() |
protected abstract void |
clearBuffer(int start,
int count) |
protected static int |
compareToInt(SimpleVector v1,
SimpleVector v2) |
protected static int |
compareToLong(SimpleVector v1,
SimpleVector v2) |
void |
consume(int start,
int length,
Consumer out) |
boolean |
consumeNext(int ipos,
Consumer out)
Copy an element specified by a position pair to a Consumer.
|
void |
consumePosRange(int iposStart,
int iposEnd,
Consumer out) |
int |
createPos(int index,
boolean isAfter)
Generate a position at a given index.
|
void |
fill(int fromIndex,
int toIndex,
java.lang.Object value) |
void |
fill(java.lang.Object value) |
void |
fillPosRange(int fromPos,
int toPos,
java.lang.Object value) |
java.lang.Object |
get(int index)
See java.util.List.
|
protected abstract java.lang.Object |
getBuffer() |
protected abstract java.lang.Object |
getBuffer(int index) |
abstract int |
getBufferLength()
Get the allocated length of the data buffer.
|
int |
getElementKind() |
int |
getNextKind(int ipos) |
java.lang.Object |
getPosNext(int ipos)
Get the element following the specified position.
|
java.lang.Object |
getRowMajor(int i) |
java.lang.String |
getTag()
This is convenience hack for printing "uniform vectors" (srfi 4).
|
int |
intAt(int index) |
int |
intAtBuffer(int index) |
protected boolean |
isAfterPos(int ipos)
Tests whether the position has the "isAfter" property.
|
long |
longAt(int index) |
long |
longAtBuffer(int index) |
protected int |
nextIndex(int ipos)
Get the offset from the beginning corresponding to a position cookie.
|
int |
nextPos(int ipos)
Return the next position following the argument.
|
java.lang.Object |
remove(int index) |
boolean |
remove(java.lang.Object o) |
boolean |
removeAll(java.util.Collection c) |
void |
removePos(int ipos,
int count)
Remove one or more elements.
|
protected void |
removePosRange(int ipos0,
int ipos1)
Remove a range where each end-point is a position in a container.
|
protected void |
resizeShift(int oldGapStart,
int oldGapEnd,
int newGapStart,
int newGapEnd)
Used by GapVector to grow and maybe move gap.
|
boolean |
retainAll(java.util.Collection c) |
java.lang.Object |
set(int index,
java.lang.Object value)
See java.util.List.
|
protected abstract java.lang.Object |
setBuffer(int index,
java.lang.Object value) |
abstract void |
setBufferLength(int length) |
void |
setSize(int size)
Set the size to a specified value.
|
void |
shift(int srcStart,
int dstStart,
int count) |
int |
size()
See java.util.List.
|
Array |
transpose(int[] lowBounds,
int[] dimensions,
int offset0,
int[] factors) |
addAll, compare, compare, compare, consume, contains, containsAll, copyPos, createRelativePos, elements, endPos, equals, equals, firstAttributePos, firstChildPos, firstChildPos, fromEndIndex, get, getAttribute, getAttributeLength, getContainingSequenceSize, getEffectiveIndex, getIndexDifference, getIterator, getIterator, getIteratorAtPos, getLowBound, getNextTypeName, getNextTypeObject, getPosPrevious, getSize, gotoAttributesStart, gotoChildrenStart, gotoParent, hashCode, hasNext, hasPrevious, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, nextIndex, nextMatching, parentPos, previousPos, rank, releasePos, set, setPosNext, setPosPrevious, stableCompare, startPos, subList, subSequence, subSequencePos, toArray, toArray, toString, toString, unsupported, unsupportedExceptionclone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitaddAll, contains, containsAll, equals, hashCode, indexOf, iterator, lastIndexOf, listIterator, listIterator, subList, toArray, toArrayconsumeget, getEffectiveIndex, getLowBound, getSize, isEmpty, rank, setpublic int size
public final int size()
AbstractSequencesize in interface Sequencesize in interface java.util.Collectionsize in interface java.util.Listsize in class AbstractSequencepublic void setSize(int size)
protected void resizeShift(int oldGapStart,
int oldGapEnd,
int newGapStart,
int newGapEnd)
public abstract int getBufferLength()
public abstract void setBufferLength(int length)
protected boolean isAfterPos(int ipos)
AbstractSequenceisAfterPos in class AbstractSequenceprotected int nextIndex(int ipos)
AbstractSequencenextIndex in class AbstractSequencepublic int createPos(int index,
boolean isAfter)
AbstractSequencecreatePos in class AbstractSequenceindex - offset from beginning of desired positionisAfter - should the position have the isAfter propertypublic int nextPos(int ipos)
AbstractSequencenextPos in class AbstractSequenceprotected abstract java.lang.Object getBuffer()
public java.lang.Object get(int index)
AbstractSequenceget in interface Sequenceget in interface java.util.Listget in class AbstractSequencepublic java.lang.Object getPosNext(int ipos)
AbstractSequencegetPosNext in class AbstractSequenceipos - the specified position.public int intAtBuffer(int index)
public int intAt(int index)
public long longAt(int index)
public long longAtBuffer(int index)
public java.lang.Object getRowMajor(int i)
getRowMajor in interface Arrayprotected abstract java.lang.Object getBuffer(int index)
public java.lang.Object set(int index,
java.lang.Object value)
Sequenceset in interface Sequenceset in interface java.util.Listset in class AbstractSequenceprotected abstract java.lang.Object setBuffer(int index,
java.lang.Object value)
public void fill(java.lang.Object value)
fill in interface Sequencefill in class AbstractSequencepublic void fillPosRange(int fromPos,
int toPos,
java.lang.Object value)
fillPosRange in class AbstractSequencepublic void fill(int fromIndex,
int toIndex,
java.lang.Object value)
fill in class AbstractSequencepublic void shift(int srcStart,
int dstStart,
int count)
public boolean add(java.lang.Object o)
AbstractSequenceadd in interface java.util.Collectionadd in interface java.util.Listadd in class AbstractSequenceprotected int addPos(int ipos,
java.lang.Object value)
AbstractSequenceaddPos in class AbstractSequencepublic void add(int index,
java.lang.Object o)
AbstractSequenceadd in interface java.util.Listadd in class AbstractSequencepublic boolean addAll(int index,
java.util.Collection c)
AbstractSequenceaddAll in interface java.util.ListaddAll in class AbstractSequenceprotected abstract void clearBuffer(int start,
int count)
protected void removePosRange(int ipos0,
int ipos1)
AbstractSequenceremovePosRange in class AbstractSequenceipos0 - start of range, as a poistionipos1 - end of rangepublic void removePos(int ipos,
int count)
AbstractSequenceremovePos in class AbstractSequenceipos - position where elements should be removedcount - if non-negative, remove that number of elements
following (poses, posNumber); if negative the negative of the number
of elements to remove before (poses, posNumber).public java.lang.Object remove(int index)
remove in interface java.util.Listremove in class AbstractSequencepublic boolean remove(java.lang.Object o)
remove in interface java.util.Collectionremove in interface java.util.Listremove in class AbstractSequencepublic boolean removeAll(java.util.Collection c)
removeAll in interface java.util.CollectionremoveAll in interface java.util.ListremoveAll in class AbstractSequencepublic boolean retainAll(java.util.Collection c)
retainAll in interface java.util.CollectionretainAll in interface java.util.ListretainAll in class AbstractSequencepublic void clear()
clear in interface java.util.Collectionclear in interface java.util.Listclear in class AbstractSequencepublic java.lang.String getTag()
protected static int compareToInt(SimpleVector v1, SimpleVector v2)
protected static int compareToLong(SimpleVector v1, SimpleVector v2)
public void consume(int start,
int length,
Consumer out)
public boolean consumeNext(int ipos,
Consumer out)
AbstractSequenceconsumeNext in class AbstractSequencepublic void consumePosRange(int iposStart,
int iposEnd,
Consumer out)
consumePosRange in class AbstractSequencepublic int getNextKind(int ipos)
getNextKind in class AbstractSequencepublic int getElementKind()