io.ciera.tool.sql.ooaofooa.component.impl.C_POSetImpl Maven / Gradle / Ivy
package io.ciera.tool.sql.ooaofooa.component.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.architecture.interfaces.PortSet;
import io.ciera.tool.sql.architecture.interfaces.impl.PortSetImpl;
import io.ciera.tool.sql.ooaofooa.component.C_CSet;
import io.ciera.tool.sql.ooaofooa.component.C_PO;
import io.ciera.tool.sql.ooaofooa.component.C_POSet;
import io.ciera.tool.sql.ooaofooa.component.InterfaceReferenceSet;
import io.ciera.tool.sql.ooaofooa.component.componentlibrary.PortReferenceSet;
import io.ciera.tool.sql.ooaofooa.component.componentlibrary.impl.PortReferenceSetImpl;
import io.ciera.tool.sql.ooaofooa.component.impl.C_CSetImpl;
import io.ciera.tool.sql.ooaofooa.component.impl.InterfaceReferenceSetImpl;
import java.util.Arrays;
import java.util.Comparator;
import java.util.List;
public class C_POSetImpl extends InstanceSet implements C_POSet {
public C_POSetImpl() {
}
public C_POSetImpl(Comparator super C_PO> comp) {
super(comp);
}
// attributes
@Override
public void setComponent_Id( UniqueId ref_Component_Id ) throws XtumlException {
for ( C_PO c_po : this ) c_po.setComponent_Id( ref_Component_Id );
}
@Override
public void setKey_Lett( String m_Key_Lett ) throws XtumlException {
for ( C_PO c_po : this ) c_po.setKey_Lett( m_Key_Lett );
}
@Override
public void setId( UniqueId m_Id ) throws XtumlException {
for ( C_PO c_po : this ) c_po.setId( m_Id );
}
@Override
public void setMult( int m_Mult ) throws XtumlException {
for ( C_PO c_po : this ) c_po.setMult( m_Mult );
}
@Override
public void setName( String m_Name ) throws XtumlException {
for ( C_PO c_po : this ) c_po.setName( m_Name );
}
@Override
public void setDoNotShowPortOnCanvas( boolean m_DoNotShowPortOnCanvas ) throws XtumlException {
for ( C_PO c_po : this ) c_po.setDoNotShowPortOnCanvas( m_DoNotShowPortOnCanvas );
}
// selections
@Override
public C_CSet R4010_appears_in_C_C() throws XtumlException {
C_CSet c_cset = new C_CSetImpl();
for ( C_PO c_po : this ) c_cset.add( c_po.R4010_appears_in_C_C() );
return c_cset;
}
@Override
public InterfaceReferenceSet R4016_exposes_InterfaceReference() throws XtumlException {
InterfaceReferenceSet interfacereferenceset = new InterfaceReferenceSetImpl();
for ( C_PO c_po : this ) interfacereferenceset.addAll( c_po.R4016_exposes_InterfaceReference() );
return interfacereferenceset;
}
@Override
public PortSet R422_Port() throws XtumlException {
PortSet portset = new PortSetImpl();
for ( C_PO c_po : this ) portset.add( c_po.R422_Port() );
return portset;
}
@Override
public PortReferenceSet R4709_is_referenced_by_PortReference() throws XtumlException {
PortReferenceSet portreferenceset = new PortReferenceSetImpl();
for ( C_PO c_po : this ) portreferenceset.addAll( c_po.R4709_is_referenced_by_PortReference() );
return portreferenceset;
}
@Override
public C_PO nullElement() {
return C_POImpl.EMPTY_C_PO;
}
@Override
public C_POSet emptySet() {
return new C_POSetImpl();
}
@Override
public C_POSet emptySet(Comparator super C_PO> comp) {
return new C_POSetImpl(comp);
}
@Override
public List elements() {
C_PO[] elements = toArray(new C_PO[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