- java.lang.Object
-
- de.learnlib.filter.reuse.tree.ReuseNode<S,I,O>
-
- Type Parameters:
S
- system state classI
- input symbol classO
- output symbol class
public class ReuseNode<S,I,O> extends Object
AReuseNode
is a vertex in theReuseTree
that contains (a possibly empty) set of outgoingReuseEdge
s. EachReuseNode
may contain a system state holding relevant information (e.g. database identifiers or an object) that belongs to the system state that 'represents' the system state after executing a membership query.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
ReuseNode.NodeResult<S,I,O>
-
Constructor Summary
Constructors Constructor Description ReuseNode(int id, int alphabetSize, int maxSystemStates, BoundedDeque.AccessPolicy accessPolicy, BoundedDeque.EvictPolicy evictPolicy)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addEdge(int index, ReuseEdge<S,I,O> edge)
@Nullable S
addSystemState(S state)
void
clearSystemStates()
@Nullable S
fetchSystemState(boolean remove)
Retrieve a system state.Collection<ReuseEdge<S,I,O>>
getEdges()
@Nullable ReuseEdge<S,I,O>
getEdgeWithInput(int index)
Return the edge with the given index.int
getId()
@Nullable ReuseNode<S,I,O>
getTargetNodeForInput(int index)
boolean
hasSystemStates()
Iterator<S>
systemStatesIterator()
-
-
-
Constructor Detail
-
ReuseNode
public ReuseNode(int id, int alphabetSize, int maxSystemStates, BoundedDeque.AccessPolicy accessPolicy, BoundedDeque.EvictPolicy evictPolicy)
-
-
Method Detail
-
fetchSystemState
public @Nullable S fetchSystemState(boolean remove)
Retrieve a system state.- Parameters:
remove
- a flag whether the system state should be removed from the internal storage after retrieval- Returns:
- a system state, May be
null
.
-
hasSystemStates
public boolean hasSystemStates()
-
clearSystemStates
public void clearSystemStates()
-
getEdges
public Collection<ReuseEdge<S,I,O>> getEdges()
- Returns:
- the outgoing edges of this node
-
addEdge
public void addEdge(int index, ReuseEdge<S,I,O> edge)
- Parameters:
index
- the position (index) of the edge to addedge
- the edge to add
-
getEdgeWithInput
public @Nullable ReuseEdge<S,I,O> getEdgeWithInput(int index)
Return the edge with the given index.- Parameters:
index
- the index of the edge- Returns:
- the edge with the given index. May be
null
.
-
getId
public int getId()
-
-