S
- The type of the (successor) state.public interface Edge<S>
Do not implement this interface when you plan to use the reference implementations given by this package. Their equals and hashCode methods assume that there are no further implementations of this interface to optimise performance.
Modifier and Type | Method | Description |
---|---|---|
java.util.PrimitiveIterator.OfInt |
acceptanceSetIterator() |
An iterator containing all acceptance sets this edge is a member of in ascending order.
|
S |
getSuccessor() |
Get the target state of the edge.
|
boolean |
hasAcceptanceSets() |
Returns whether this edge has any acceptance set.
|
boolean |
inSet(int i) |
Test membership of this edge for a specific acceptance set.
|
int |
largestAcceptanceSet() |
Returns the largest acceptance set this edge is a member of, or
-1 if none. |
static <S> Edge<S> |
of(S successor) |
Creates an edge which belongs to no delegate set.
|
static <S> Edge<S> |
of(S successor,
int acceptance) |
Creates an edge which belongs to a single delegate set.
|
static <S> Edge<S> |
of(S successor,
java.util.BitSet acceptance) |
Creates an edge which belongs to the specified delegate sets.
|
int |
smallestAcceptanceSet() |
Returns the largest acceptance set this edge is a member of, or
Integer.MAX_VALUE if
none. |
default Edge<S> |
withAcceptance(java.util.BitSet acceptance) |
|
default Edge<S> |
withAcceptance(java.util.function.IntUnaryOperator transformer) |
|
<T> Edge<T> |
withSuccessor(T successor) |
Returns an edge which has the same acceptance but the given state as successor.
|
static <S> Edge<S> of(S successor)
S
- Type of the successor.successor
- Successor of this edge.successor
with no delegate.static <S> Edge<S> of(S successor, @Nonnegative int acceptance)
S
- Type of the successor.successor
- Successor of this edge.acceptance
- The delegate set this edge should belong to.successor
with given delegate.static <S> Edge<S> of(S successor, java.util.BitSet acceptance)
S
- Type of the successor.successor
- Successor of this edge.acceptance
- The delegate sets this edge should belong to.successor
with given delegate.java.util.PrimitiveIterator.OfInt acceptanceSetIterator()
S getSuccessor()
boolean hasAcceptanceSets()
boolean inSet(@Nonnegative int i)
i
- The number of the acceptance set.int largestAcceptanceSet()
-1
if none.int smallestAcceptanceSet()
Integer.MAX_VALUE
if
none.<T> Edge<T> withSuccessor(T successor)