
io.ciera.tool.sql.architecture.statemachine.impl.StateSetImpl Maven / Gradle / Ivy
package io.ciera.tool.sql.architecture.statemachine.impl;
import io.ciera.runtime.summit.classes.InstanceSet;
import io.ciera.runtime.summit.exceptions.XtumlException;
import io.ciera.tool.sql.architecture.invocable.InvocableObjectSet;
import io.ciera.tool.sql.architecture.invocable.impl.InvocableObjectSetImpl;
import io.ciera.tool.sql.architecture.statemachine.State;
import io.ciera.tool.sql.architecture.statemachine.StateMachineSet;
import io.ciera.tool.sql.architecture.statemachine.StateSet;
import io.ciera.tool.sql.architecture.statemachine.StateTransitionSet;
import io.ciera.tool.sql.architecture.statemachine.TransitionTableRowSet;
import io.ciera.tool.sql.architecture.statemachine.impl.StateMachineSetImpl;
import io.ciera.tool.sql.architecture.statemachine.impl.StateTransitionSetImpl;
import io.ciera.tool.sql.architecture.statemachine.impl.TransitionTableRowSetImpl;
import io.ciera.tool.sql.ooaofooa.statemachine.StateMachineStateSet;
import io.ciera.tool.sql.ooaofooa.statemachine.impl.StateMachineStateSetImpl;
import java.util.Arrays;
import java.util.Comparator;
import java.util.List;
public class StateSetImpl extends InstanceSet implements StateSet {
public StateSetImpl() {
}
public StateSetImpl(Comparator super State> comp) {
super(comp);
}
// attributes
@Override
public void setFinal( boolean m_final ) throws XtumlException {
for ( State state : this ) state.setFinal( m_final );
}
@Override
public void setSm_name( String ref_sm_name ) throws XtumlException {
for ( State state : this ) state.setSm_name( ref_sm_name );
}
@Override
public void setNumber( int m_number ) throws XtumlException {
for ( State state : this ) state.setNumber( m_number );
}
@Override
public void setName( String ref_name ) throws XtumlException {
for ( State state : this ) state.setName( ref_name );
}
@Override
public void setSm_package( String ref_sm_package ) throws XtumlException {
for ( State state : this ) state.setSm_package( ref_sm_package );
}
// selections
@Override
public InvocableObjectSet R427_is_a_InvocableObject() throws XtumlException {
InvocableObjectSet invocableobjectset = new InvocableObjectSetImpl();
for ( State state : this ) invocableobjectset.add( state.R427_is_a_InvocableObject() );
return invocableobjectset;
}
@Override
public StateMachineSet R4751_StateMachine() throws XtumlException {
StateMachineSet statemachineset = new StateMachineSetImpl();
for ( State state : this ) statemachineset.add( state.R4751_StateMachine() );
return statemachineset;
}
@Override
public TransitionTableRowSet R4754_is_start_state_for_TransitionTableRow() throws XtumlException {
TransitionTableRowSet transitiontablerowset = new TransitionTableRowSetImpl();
for ( State state : this ) transitiontablerowset.add( state.R4754_is_start_state_for_TransitionTableRow() );
return transitiontablerowset;
}
@Override
public StateTransitionSet R4757_StateTransition() throws XtumlException {
StateTransitionSet statetransitionset = new StateTransitionSetImpl();
for ( State state : this ) statetransitionset.addAll( state.R4757_StateTransition() );
return statetransitionset;
}
@Override
public StateMachineStateSet R4758_StateMachineState() throws XtumlException {
StateMachineStateSet statemachinestateset = new StateMachineStateSetImpl();
for ( State state : this ) statemachinestateset.add( state.R4758_StateMachineState() );
return statemachinestateset;
}
@Override
public State nullElement() {
return StateImpl.EMPTY_STATE;
}
@Override
public StateSet emptySet() {
return new StateSetImpl();
}
@Override
public StateSet emptySet(Comparator super State> comp) {
return new StateSetImpl(comp);
}
@Override
public List elements() {
State[] elements = toArray(new State[0]);
Arrays.sort(elements, (a, b) -> {
try {
return a.getName().compareTo(b.getName());
} catch (XtumlException e) { return 0; }
});
return Arrays.asList(elements);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy