public class Node extends Object
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object obj) |
Sequence |
getSequence()
Returns the sequence this node belongs to.
|
Value |
getValue(int index)
Returns the value stored in this Node for the given keyword or null of no
value is stored for the given keyword in this node.
|
Value |
getValue(String keyword)
Returns the value stored in this Node for the given keyword or null of no
value is stored for the given keyword in this node.
|
int |
hashCode() |
void |
setValue(int index,
Value value)
Sets the value for the given keyword.
|
void |
setValue(String keyword,
Value value)
Sets the value for the given keyword.
|
public Node(@NonNull Sequence sequence)
public Sequence getSequence()
public Value getValue(@NonNull String keyword) throws UnsupportedOperationException
keyword
- a keywordUnsupportedOperationException
- is thrown if the given keyword is
not supported by the NodeSpecification.public Value getValue(int index) throws ArrayIndexOutOfBoundsException
index
- a keyword index.ArrayIndexOutOfBoundsException
- is thrown if the given index is
too large or too small.public void setValue(@NonNull String keyword, Value value) throws UnsupportedOperationException
keyword
- a keyword.value
- a value with the correct type.UnsupportedOperationException
- is thrown if the given keyword is
not supported by the NodeSpecification or if the given value has the
wrong type.public void setValue(int index, Value value) throws UnsupportedOperationException, ArrayIndexOutOfBoundsException
index
- a keyword index.value
- a value with the correct type.UnsupportedOperationException
- is thrown if the given value has
the wrong type.ArrayIndexOutOfBoundsException
- is thrown if the given index is
too large or too small.Copyright (C) 2016 Benjamin Paaßen, AG Theoretical Computer Science, Centre of Excellence Cognitive Interaction Technology (CITEC), University of Bielefeld, licensed under the AGPL v. 3: http://openresearch.cit-ec.de/projects/tcs . This documentation is licensed under the conditions of CC-BY-SA 4.0: https://creativecommons.org/licenses/by-sa/4.0/