public class Node
extends java.lang.Object
Constructor and Description |
---|
Node() |
Modifier and Type | Method and Description |
---|---|
@NotNull Node |
define(char ch)
Looks up or defines the next node for a given character.
|
byte |
getId()
Returns the id for this node.
|
@Nullable Node |
lookup(char ch)
Looks up the next node for a given character.
|
void |
setId(byte id)
Sets the id to return for this node.
|
@NotNull public @NotNull Node define(char ch)
ch
- the characterjava.lang.IndexOutOfBoundsException
- if the character is not withing MIN
..MAX
@Nullable public @Nullable Node lookup(char ch)
ch
- the characternull
if no key matching existspublic void setId(byte id)
id
- the ide to setpublic byte getId()
token.NULL
if no key matches this node