
io.ciera.tool.sql.architecture.statement.impl.VariableSetImpl Maven / Gradle / Ivy
package io.ciera.tool.sql.architecture.statement.impl;
import io.ciera.runtime.summit.classes.InstanceSet;
import io.ciera.runtime.summit.exceptions.XtumlException;
import io.ciera.tool.sql.architecture.expression.VariableReferenceSet;
import io.ciera.tool.sql.architecture.expression.impl.VariableReferenceSetImpl;
import io.ciera.tool.sql.architecture.statement.FinalizationSet;
import io.ciera.tool.sql.architecture.statement.ForSmtSet;
import io.ciera.tool.sql.architecture.statement.StatementSet;
import io.ciera.tool.sql.architecture.statement.Variable;
import io.ciera.tool.sql.architecture.statement.VariableInScopeSet;
import io.ciera.tool.sql.architecture.statement.VariableSet;
import io.ciera.tool.sql.architecture.statement.impl.FinalizationSetImpl;
import io.ciera.tool.sql.architecture.statement.impl.ForSmtSetImpl;
import io.ciera.tool.sql.architecture.statement.impl.StatementSetImpl;
import io.ciera.tool.sql.architecture.statement.impl.VariableInScopeSetImpl;
import io.ciera.tool.sql.architecture.type.TypeReferenceSet;
import io.ciera.tool.sql.architecture.type.impl.TypeReferenceSetImpl;
import java.util.Arrays;
import java.util.Comparator;
import java.util.List;
public class VariableSetImpl extends InstanceSet implements VariableSet {
public VariableSetImpl() {
}
public VariableSetImpl(Comparator super Variable> comp) {
super(comp);
}
// attributes
@Override
public void setType_reference_name( String ref_type_reference_name ) throws XtumlException {
for ( Variable variable : this ) variable.setType_reference_name( ref_type_reference_name );
}
@Override
public void setBlock_number( String ref_block_number ) throws XtumlException {
for ( Variable variable : this ) variable.setBlock_number( ref_block_number );
}
@Override
public void setType_name( String ref_type_name ) throws XtumlException {
for ( Variable variable : this ) variable.setType_name( ref_type_name );
}
@Override
public void setParent_package( String ref_parent_package ) throws XtumlException {
for ( Variable variable : this ) variable.setParent_package( ref_parent_package );
}
@Override
public void setType_package( String ref_type_package ) throws XtumlException {
for ( Variable variable : this ) variable.setType_package( ref_type_package );
}
@Override
public void setStatement_number( String ref_statement_number ) throws XtumlException {
for ( Variable variable : this ) variable.setStatement_number( ref_statement_number );
}
@Override
public void setBody_name( String ref_body_name ) throws XtumlException {
for ( Variable variable : this ) variable.setBody_name( ref_body_name );
}
@Override
public void setName( String m_name ) throws XtumlException {
for ( Variable variable : this ) variable.setName( m_name );
}
@Override
public void setParent_name( String ref_parent_name ) throws XtumlException {
for ( Variable variable : this ) variable.setParent_name( ref_parent_name );
}
// selections
@Override
public StatementSet R457_is_declared_by_Statement() throws XtumlException {
StatementSet statementset = new StatementSetImpl();
for ( Variable variable : this ) statementset.add( variable.R457_is_declared_by_Statement() );
return statementset;
}
@Override
public VariableInScopeSet R458_is_in_scope_for_VariableInScope() throws XtumlException {
VariableInScopeSet variableinscopeset = new VariableInScopeSetImpl();
for ( Variable variable : this ) variableinscopeset.addAll( variable.R458_is_in_scope_for_VariableInScope() );
return variableinscopeset;
}
@Override
public ForSmtSet R459_is_iterator_for_ForSmt() throws XtumlException {
ForSmtSet forsmtset = new ForSmtSetImpl();
for ( Variable variable : this ) forsmtset.add( variable.R459_is_iterator_for_ForSmt() );
return forsmtset;
}
@Override
public TypeReferenceSet R461_is_typed_by_TypeReference() throws XtumlException {
TypeReferenceSet typereferenceset = new TypeReferenceSetImpl();
for ( Variable variable : this ) typereferenceset.add( variable.R461_is_typed_by_TypeReference() );
return typereferenceset;
}
@Override
public FinalizationSet R485_finalized_by_Finalization() throws XtumlException {
FinalizationSet finalizationset = new FinalizationSetImpl();
for ( Variable variable : this ) finalizationset.addAll( variable.R485_finalized_by_Finalization() );
return finalizationset;
}
@Override
public VariableReferenceSet R782_referenced_through_VariableReference() throws XtumlException {
VariableReferenceSet variablereferenceset = new VariableReferenceSetImpl();
for ( Variable variable : this ) variablereferenceset.addAll( variable.R782_referenced_through_VariableReference() );
return variablereferenceset;
}
@Override
public Variable nullElement() {
return VariableImpl.EMPTY_VARIABLE;
}
@Override
public VariableSet emptySet() {
return new VariableSetImpl();
}
@Override
public VariableSet emptySet(Comparator super Variable> comp) {
return new VariableSetImpl(comp);
}
@Override
public List elements() {
Variable[] elements = toArray(new Variable[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