All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.ciera.tool.sql.ooaofooa.activity.impl.AcceptEventActionSetImpl Maven / Gradle / Ivy

package io.ciera.tool.sql.ooaofooa.activity.impl;


import io.ciera.runtime.summit.classes.InstanceSet;
import io.ciera.runtime.summit.exceptions.XtumlException;
import io.ciera.runtime.summit.types.UniqueId;
import io.ciera.tool.sql.ooaofooa.activity.AcceptEventAction;
import io.ciera.tool.sql.ooaofooa.activity.AcceptEventActionSet;
import io.ciera.tool.sql.ooaofooa.activity.AcceptEventSet;
import io.ciera.tool.sql.ooaofooa.activity.impl.AcceptEventSetImpl;

import java.util.Arrays;
import java.util.Comparator;
import java.util.List;


public class AcceptEventActionSetImpl extends InstanceSet implements AcceptEventActionSet {

    public AcceptEventActionSetImpl() {
    }

    public AcceptEventActionSetImpl(Comparator comp) {
        super(comp);
    }

    // attributes
    @Override
    public void setId( UniqueId ref_Id ) throws XtumlException {
        for ( AcceptEventAction accepteventaction : this ) accepteventaction.setId( ref_Id );
    }
    @Override
    public void setDescrip( String m_Descrip ) throws XtumlException {
        for ( AcceptEventAction accepteventaction : this ) accepteventaction.setDescrip( m_Descrip );
    }
    @Override
    public void setName( String m_Name ) throws XtumlException {
        for ( AcceptEventAction accepteventaction : this ) accepteventaction.setName( m_Name );
    }


    // selections
    @Override
    public AcceptEventSet R1112_is_a_AcceptEvent() throws XtumlException {
        AcceptEventSet accepteventset = new AcceptEventSetImpl();
        for ( AcceptEventAction accepteventaction : this ) accepteventset.add( accepteventaction.R1112_is_a_AcceptEvent() );
        return accepteventset;
    }


    @Override
    public AcceptEventAction nullElement() {
        return AcceptEventActionImpl.EMPTY_ACCEPTEVENTACTION;
    }

    @Override
    public AcceptEventActionSet emptySet() {
      return new AcceptEventActionSetImpl();
    }

    @Override
    public AcceptEventActionSet emptySet(Comparator comp) {
      return new AcceptEventActionSetImpl(comp);
    }

    @Override
    public List elements() {
        AcceptEventAction[] elements = toArray(new AcceptEventAction[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