
org.xcsp.modeler.entities.ObjEntities Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of xcsp3-tools Show documentation
Show all versions of xcsp3-tools Show documentation
Java Tools for parsing XCSP3 instances, compiling JvCSP3 models, and checking solutions. For more information about XCSP3, follow www.xcsp.org
The newest version!
package org.xcsp.modeler.entities;
import java.util.ArrayList;
import java.util.List;
import java.util.stream.Collectors;
import org.xcsp.common.Types.TypeClass;
import org.xcsp.modeler.definitions.IObj;
public class ObjEntities {
public List allEntities = new ArrayList<>();
public class ObjEntity extends ModelingEntity {
public IObj obj;
public ObjEntity(IObj obj, TypeClass... classes) {
super(classes);
this.obj = obj;
allEntities.add(this);
}
}
public boolean active() {
return allEntities.size() > 0;
}
@Override
public String toString() {
return allEntities.stream().map(e -> e.getClass().getSimpleName()).collect(Collectors.joining(" "));
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy