Search in sources :

Example 1 with TypeWrapper

use of org.opentosca.toscana.core.parse.converter.TypeWrapper in project TOSCAna by StuPro-TOSCAna.

the class BaseToscaElement method getThisAsSet.

protected <T> Set<T> getThisAsSet(Class<T> type) {
    TypeWrapper factory = new TypeWrapper();
    Collection<Entity> values = mappingEntity.getChildren();
    Set<T> results = new HashSet<>();
    for (Entity v : values) {
        T result = factory.wrapEntity((MappingEntity) v, type);
        results.add(result);
    }
    return results;
}
Also used : MappingEntity(org.opentosca.toscana.core.parse.model.MappingEntity) Entity(org.opentosca.toscana.core.parse.model.Entity) TypeWrapper(org.opentosca.toscana.core.parse.converter.TypeWrapper) HashSet(java.util.HashSet)

Aggregations

HashSet (java.util.HashSet)1 TypeWrapper (org.opentosca.toscana.core.parse.converter.TypeWrapper)1 Entity (org.opentosca.toscana.core.parse.model.Entity)1 MappingEntity (org.opentosca.toscana.core.parse.model.MappingEntity)1