Class Node
- java.lang.Object
-
- net.sf.gridarta.textedit.textarea.tokenmarker.Node
-
public class Node extends java.lang.ObjectA node in the tree that is used to store all key-value pairs.
-
-
Constructor Summary
Constructors Constructor Description Node()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description @NotNull Nodedefine(char ch)Looks up or defines the next node for a given character.bytegetId()Returns the id for this node.@Nullable Nodelookup(char ch)Looks up the next node for a given character.voidsetId(byte id)Sets the id to return for this node.
-
-
-
Method Detail
-
define
@NotNull public @NotNull Node define(char ch)
Looks up or defines the next node for a given character.- Parameters:
ch- the character- Returns:
- the next node
- Throws:
java.lang.IndexOutOfBoundsException- if the character is not withingMIN..MAX
-
lookup
@Nullable public @Nullable Node lookup(char ch)
Looks up the next node for a given character.- Parameters:
ch- the character- Returns:
- the next node, or
nullif no key matching exists
-
setId
public void setId(byte id)
Sets the id to return for this node.- Parameters:
id- the ide to set
-
getId
public byte getId()
Returns the id for this node.- Returns:
- this id, or
token.NULLif no key matches this node
-
-