| Prev Class | Next Class | Frames | No Frames |
| Summary: Nested | Field | Method | Constr | Detail: Nested | Field | Method | Constr |
java.lang.Objectgnu.lists.AbstractSequencegnu.lists.TreeListField Summary | |
protected static int |
|
protected static int |
|
protected static int |
|
protected static int |
|
protected static int |
|
static int |
|
protected static char |
|
protected static int |
|
int |
|
char[] | |
int |
|
int | |
int | |
Object[] | |
int | |
Constructor Summary | |
| |
Method Summary | |
Object |
|
void |
|
void |
|
void | |
void |
|
void |
|
void |
|
int |
|
void | |
void |
|
int |
|
boolean |
|
void |
|
int |
|
int |
|
void |
|
void |
|
void | |
void | |
void |
|
void |
|
int |
|
int |
|
int |
|
int |
|
Object |
|
protected int |
|
protected int |
|
protected long |
|
int |
|
protected int |
|
String |
|
Object |
|
Object |
|
int |
|
Object |
|
boolean | |
int |
|
int |
|
boolean |
|
int |
|
boolean |
|
boolean |
|
int |
|
int |
|
int |
|
int |
|
int |
|
int |
|
void | |
void |
|
int |
|
void | |
void |
|
int |
|
int |
|
void |
|
void |
|
void |
|
void |
|
void |
|
void |
|
void |
|
void |
|
void |
|
void |
|
void |
|
void |
|
void |
|
void |
|
void |
|
void |
|
protected static final int BEGIN_ATTRIBUTE_LONG
The beginning of an attribute. [BEGIN_ATTRIBUTE_LONG] [index], 2 shorts, where objects[index] is the attribute type name and objects[index+1] is the attribute type object. [end_offset], 2 shorts, giving the location of the following END_ATTRIBUTE. If the attribute straddles the gap, then end_offset is a negative offset relative to data.length. (Therefore allocating more space for the gap does not require adjusting end_offset.) Otherwise, the end_offset is relative to the BEGIN_ATTRIBUTE_LONG word. Kludge warning: ParsedXMLToConsumer.endAttributes has hard-wired in the size of BEGIN_ATTRIBUTE_LONG and END_ATTRIBUTE.
- Field Value:
- 61705
protected static final int BEGIN_DOCUMENT
Beginning of a document (or top-level value). [end_offset], 2 shorts, giving the location of the following END_DOCUMENT. If the attribute straddles the gap, then end_offset is a negative offset relative to data.length. (Therefore allocating more space for the gap does not require adjusting end_offset.) Otherwise, the end_offset is relative to the BEGIN_DOCUMENT word. Used to distinguish a document from its element node.
- Field Value:
- 61712
protected static final int END_DOCUMENT
End of a document.
- Field Value:
- 61713
protected static final int END_GROUP_LONG
End of a group, non-compact form. [END_GROUP_LONG] [index], 2 shorts where objects[index] is the group's type name and objects[index+1] is the type object. [begin_offset], in 2 shorts. The position of the matching BEGIN_GROUP_LONG. If the group straddles the gap, then begin_offset is the actual index (i.e. relative to the start of data) of the matching BEGIN_GROUP_LONG. (Therefore allocating more space for the gap does not require adjusting begin_offset.) If the group does not straddle the gap, then begin_offset is a negative offset relative to the END_GROUP_LONG word. (Hence shifting an entire group when the gap is moved does not require changing its begin_offset.) relative to data.length. [parent_offset], in 2 shorts. The position of the outer BEGIN_GROUP_LONG, BEGIN_GROUP_SHORT or BEGIN_DOCUMENT. If the difference straddles the gap (i.e. either this group straddles the gap or the parent group does and the gap precedes this group), then parent_offset is the actual index of the parent group. Otherwise, then parent_offset is a negative offset relative to the END_GROUP_LONG word.
- Field Value:
- 61708
protected static final int END_GROUP_SHORT
End of a group, compact form. [END_GROUP_SHORT] [begin_offset], the unsigned absolute value of the offset to the matching BEGIN. (This is the same as the matching end_offset.)
- Field Value:
- 61707
public static final int INT_FOLLOWS
A 32-bit integer, non-compact form. [INT_FOLLOWS] [word1], [word2]: The big-endian bits of the integer.
- Field Value:
- 61698
protected static final char POSITION_PAIR_FOLLOWS
A position triple referenceing some other "nodes". Followed by index of sequence (2 chars), and ipos (2 chars).
- Field Value:
- '\uf10f'
protected static final int PROCESSING_INSTRUCTION
A processing-instruction node follows. [PROCESSING_INSTRUCTION] [target] 2 shorts, where objects[target] is the target as a String. [length] 2 shorts. [comment text], (length) number of characters.
- Field Value:
- 61716
public int attrStart
If non-zero, gap is in an attribute starting (1 less than) here.
public char[] data
public int docStart
If non-zero, gap is in an document starting (1 less than) here.
public int gapEnd
public int gapStart
public Object[] objects
public int oindex
public TreeList()
public TreeList(TreeList list, int startPosition, int endPosition)
Make a copy of a sub-range of a TreeList.
- Parameters:
list- the TreeList to copystartPosition- start of range, as a raw index in dataendPosition- end of range, as a raw index in data
public Object baseUriOfPos(int pos)
Return of the base-uri property, if known, of the node at pos.
- Overrides:
- baseUriOfPos in interface AbstractSequence
public void beginAttribute(String attrName,
Object attrType)Write a attribute for the current group. This is only allowed immediately after a beginGroup.
- Specified by:
- beginAttribute in interface Consumer
public void beginAttribute(int index)
public void beginGroup(String typeName,
Object type)
- Specified by:
- beginGroup in interface Consumer
public void beginGroup(int index)
public int compare(int ipos1,
int ipos2)Compare two positions, and indicate their relative order.
- Overrides:
- compare in interface AbstractSequence
public void consume(Consumer out)
- Specified by:
- consume in interface Consumable
- Overrides:
- consume in interface AbstractSequence
public void consume(SeqPosition position)
Consume node at current position. The caller may invalidate or change the position after consume returns, so if the consumer wants to save it, it needs to copy it.
- Specified by:
- consume in interface PositionConsumer
public boolean consumeNext(int ipos,
Consumer out)Copy an element specified by a position pair to a Consumer.
- Overrides:
- consumeNext in interface AbstractSequence
- Returns:
- if hasNext(ipos).
public void consumePosRange(int startPos,
int endPos,
Consumer out)
- Overrides:
- consumePosRange in interface AbstractSequence
public int createPos(int index,
boolean isAfter)Generate a position at a given index. The result is a position cookie that must be free'd with releasePos.
- Overrides:
- createPos in interface AbstractSequence
- Parameters:
index- offset from beginning of desired positionisAfter- should the position have the isAfter property
public int createRelativePos(int istart,
int offset,
boolean isAfter)
- Overrides:
- createRelativePos in interface AbstractSequence
public void dump()
public void dump(java.io.PrintWriter out)
public void ensureSpace(int needed)
public int find(Object arg1)
public int find(Object arg1,
Object arg2)public int firstAttributePos(int ipos)
Like firstChildPos. Problem: Should this stop before we get to children? I think so, but that requires changes to TreeList.
- Overrides:
- firstAttributePos in interface AbstractSequence
public int firstChildPos(int ipos)
Get position before first child (of the element following position).
- Overrides:
- firstChildPos in interface AbstractSequence
- Parameters:
ipos- parent position. It is not released by this method.
- Returns:
- non-zero position cookie if there is a child sequence (which might be empty); zero if current position is end of sequence or following element is atomic (cannot have children).
protected int getIndexDifference(int ipos1,
int ipos0)Get offset of (ipos1) relative to (ipos0).
- Overrides:
- getIndexDifference in interface AbstractSequence
protected final int getIntN(int index)
Get a 32-bit int from the data array.
protected final long getLongN(int index)
Get a 64-bit long from the data array.
protected int getNextTypeIndex(int ipos)
public String getNextTypeName(int ipos)
- Overrides:
- getNextTypeName in interface AbstractSequence
public Object getNextTypeObject(int ipos)
- Overrides:
- getNextTypeObject in interface AbstractSequence
public Object getPosNext(int ipos)
Get the element following the specified position.
- Overrides:
- getPosNext in interface AbstractSequence
- Parameters:
ipos- the specified position.
- Returns:
- the following element, or eofValue if there is none. Called by SeqPosition.getNext.
public int getPosNextInt(int ipos)
Return following value (like getPosNext), as an integer.
public Object getPosPrevious(int ipos)
Get the element before the specified position.
- Overrides:
- getPosPrevious in interface AbstractSequence
- Parameters:
ipos- the specified position.
- Returns:
- the following element, or eofValue if there is none.
public boolean gotoAttributesStart(TreePosition pos)
- Overrides:
- gotoAttributesStart in interface AbstractSequence
public int gotoAttributesStart(int index)
public final int gotoChildrenStart(int index)
public boolean ignoring()
True if consumer is ignoring rest of group. The producer can use this information to skip ahead.
public final int nextDataIndex(int pos)
public int nextMatching(int startPos,
ElementPredicate predicate,
int endPos,
boolean descend)Get next matching child or descendent (ignoring attributes).
- Overrides:
- nextMatching in interface AbstractSequence
- Parameters:
startPos- starting positionendPos- stop before endPosdescend- if true do depth-first traversal.
- Returns:
- poistion of next match or 0 if none found
public final int nextNodeIndex(int pos,
int limit)Skip all primitive content nodes.
public int nextPos(int position)
Return the next position following the argument. The new position has the isAfter property. The argument is implicitly released (as in releasePos). Returns 0 if we are already at end of file.
- Overrides:
- nextPos in interface AbstractSequence
public int parentPos(int ipos)
Get position of parent.
- Overrides:
- parentPos in interface AbstractSequence
- Parameters:
ipos- child position. It is not released by this method.
- Returns:
- the p os of the parent, or endPos() is there is no known parent.
public final int posToDataIndex(int ipos)
public final void resizeObjects()
public final void setIntN(int index,
int i)public void statistics()
public void statistics(java.io.PrintWriter out)
public int stringValue(boolean inGroup,
int index,
StringBuffer sbuf)public int stringValue(int index,
StringBuffer sbuf)public void toString(String sep,
StringBuffer sbuf)
- Overrides:
- toString in interface AbstractSequence
public void writeBaseUri(Object uri)
Write/set the base-uri property of the current element or document. Only allowed immediately following beginDocument, beginGroup, or writeProcessingInstruction.
- Specified by:
- writeBaseUri in interface XConsumer
public void writeByte(int v)
public void writeCDATA(char[] chars,
int offset,
int length)
- Specified by:
- writeCDATA in interface XConsumer
public void writeComment(char[] chars,
int offset,
int length)
- Specified by:
- writeComment in interface XConsumer
public void writePosition(AbstractSequence seq, int ipos)
Consume a single position pair. This PositionConsumer may assume the sequence does no reference management; i.e. that copyPos is trivial and releasePos is a no-op. If that is not the case, use consume(TreePosition) instead.
- Specified by:
- writePosition in interface PositionConsumer
public void writeProcessingInstruction(String target,
char[] content,
int offset,
int length)
- Specified by:
- writeProcessingInstruction in interface XConsumer