
io.ciera.tool.sql.ooaofooa.interaction.impl.ActorParticipantSetImpl Maven / Gradle / Ivy
package io.ciera.tool.sql.ooaofooa.interaction.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.interaction.ActorParticipant;
import io.ciera.tool.sql.ooaofooa.interaction.ActorParticipantSet;
import io.ciera.tool.sql.ooaofooa.interaction.InteractionParticipantSet;
import io.ciera.tool.sql.ooaofooa.interaction.LifespanSet;
import io.ciera.tool.sql.ooaofooa.interaction.impl.InteractionParticipantSetImpl;
import io.ciera.tool.sql.ooaofooa.interaction.impl.LifespanSetImpl;
import java.util.Arrays;
import java.util.Comparator;
import java.util.List;
public class ActorParticipantSetImpl extends InstanceSet implements ActorParticipantSet {
public ActorParticipantSetImpl() {
}
public ActorParticipantSetImpl(Comparator super ActorParticipant> comp) {
super(comp);
}
// attributes
@Override
public void setName( String m_Name ) throws XtumlException {
for ( ActorParticipant actorparticipant : this ) actorparticipant.setName( m_Name );
}
@Override
public void setDescrip( String m_Descrip ) throws XtumlException {
for ( ActorParticipant actorparticipant : this ) actorparticipant.setDescrip( m_Descrip );
}
@Override
public void setPart_ID( UniqueId ref_Part_ID ) throws XtumlException {
for ( ActorParticipant actorparticipant : this ) actorparticipant.setPart_ID( ref_Part_ID );
}
@Override
public void setLS_Part_ID( UniqueId ref_LS_Part_ID ) throws XtumlException {
for ( ActorParticipant actorparticipant : this ) actorparticipant.setLS_Part_ID( ref_LS_Part_ID );
}
// selections
@Override
public InteractionParticipantSet R930_is_a_InteractionParticipant() throws XtumlException {
InteractionParticipantSet interactionparticipantset = new InteractionParticipantSetImpl();
for ( ActorParticipant actorparticipant : this ) interactionparticipantset.add( actorparticipant.R930_is_a_InteractionParticipant() );
return interactionparticipantset;
}
@Override
public LifespanSet R949_life_is_bounded_by_Lifespan() throws XtumlException {
LifespanSet lifespanset = new LifespanSetImpl();
for ( ActorParticipant actorparticipant : this ) lifespanset.add( actorparticipant.R949_life_is_bounded_by_Lifespan() );
return lifespanset;
}
@Override
public ActorParticipant nullElement() {
return ActorParticipantImpl.EMPTY_ACTORPARTICIPANT;
}
@Override
public ActorParticipantSet emptySet() {
return new ActorParticipantSetImpl();
}
@Override
public ActorParticipantSet emptySet(Comparator super ActorParticipant> comp) {
return new ActorParticipantSetImpl(comp);
}
@Override
public List elements() {
ActorParticipant[] elements = toArray(new ActorParticipant[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