|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object sk.uniba.euromath.document.schema.InsertPoint
public final class InsertPoint
Defines place for inserting element into nodelist. Insertion place is
specified by insertPlace
and pos
parameters. If
insertPlace
denotes Element, then new element must be inserted
before this Element. In this case, the pos
argument is ignored
and should be set to zero. If insertPlace
denotes
CharacterData, then pos
specifies index of character, after
which new element must be inserted. Immutable, thread-safe.
Field Summary | |
---|---|
static InsertPoint |
FIRST
Insertpoint, that defines first insertion point. |
int |
insertPlace
Index of node in parent parameter. |
int |
pos
If insertPlace is CharacterData, then this parameter
defines index of character in this CharacterData, after which to insert
new element. |
Constructor Summary | |
---|---|
InsertPoint(int insertPlace,
int pos)
Creates instance of InsertPoint . |
Method Summary | |
---|---|
int |
compareTo(Object obj)
|
boolean |
equals(Object obj)
|
static InsertPoint |
getLast(Element e)
Returns an insertpoint pointing after the last child node of e. |
int |
hashCode()
|
boolean |
isValid(NodeList list,
boolean mustPointToNode,
boolean mayPointAfterLastChar)
Checks, whether this insertpoint is valid in given element. |
String |
toString()
Converts insertpoint object to a string using syntax: [insertPlace,pos] . |
static InsertPoint |
valueOf(String string)
Parses given string and returns an insert point instance. |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public final int insertPlace
0
, try to insert before first node.
Must not be negative.
public final int pos
insertPlace
is CharacterData, then this parameter
defines index of character in this CharacterData, after which to insert
new element. This value must not be negative.
public static final InsertPoint FIRST
Constructor Detail |
---|
public InsertPoint(int insertPlace, int pos)
InsertPoint
.
insertPlace
- index of node in parent parameter. Defines place,
where we want to insert new element. When 0
, try to
insert before first node. Must not be negative.pos
- if insertPlace
is CharacterData, then this
parameter defines index of character in this CharacterData, after which
to insert new element. This value must not be negative.Method Detail |
---|
public static InsertPoint getLast(Element e)
e
- the element.
public boolean equals(Object obj)
equals
in class Object
public int hashCode()
hashCode
in class Object
public int compareTo(Object obj)
compareTo
in interface Comparable
public String toString()
[insertPlace,pos]
.
toString
in class Object
public static InsertPoint valueOf(String string)
string
- string in form of [insertPlace,pos]
public boolean isValid(NodeList list, boolean mustPointToNode, boolean mayPointAfterLastChar)
list
- children of the context element.mustPointToNode
- if insertpoint is valid when it points to the end
of the nodelist - if true then it must not point after last node.mayPointAfterLastChar
- if true then the point is valid even if it
points after the last char in the character node.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |