Package owl.automaton
Class MutableAutomatonUtil
- java.lang.Object
-
- owl.automaton.MutableAutomatonUtil
-
public final class MutableAutomatonUtil extends Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
MutableAutomatonUtil.Sink
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static <S,A extends OmegaAcceptance>
MutableAutomaton<S,A>asMutable(Automaton<S,A> automaton)
static <S,A extends OmegaAcceptance>
MutableAutomaton<S,A>castMutable(Object automaton, Class<S> stateClass, Class<A> acceptanceClass)
static Optional<Object>
complete(MutableAutomaton<Object,?> automaton)
static <S> Optional<S>
complete(MutableAutomaton<S,?> automaton, S sinkState)
Completes the automaton by adding a sink state obtained from thesinkSupplier
if necessary.
-
-
-
Method Detail
-
castMutable
public static <S,A extends OmegaAcceptance> MutableAutomaton<S,A> castMutable(Object automaton, Class<S> stateClass, Class<A> acceptanceClass)
-
asMutable
public static <S,A extends OmegaAcceptance> MutableAutomaton<S,A> asMutable(Automaton<S,A> automaton)
-
complete
public static Optional<Object> complete(MutableAutomaton<Object,?> automaton)
-
complete
public static <S> Optional<S> complete(MutableAutomaton<S,?> automaton, S sinkState)
Completes the automaton by adding a sink state obtained from thesinkSupplier
if necessary. The sink state will be obtained, i.e.Supplier.get()
called exactly once, if and only if a sink is added. This state will be returned wrapped in anOptional
, if instead no state was addedOptional.empty()
is returned. After adding the sink state, therejectingAcceptanceSupplier
is called to construct a rejecting self-loop.- Parameters:
automaton
- The automaton to complete.sinkState
- A sink state.- Returns:
- The added state or
empty
if none was added.
-
-