Universe::UniverseJavaConstraint class

The UniverseJavaConstraint class defines an adapter for an IUniverseConstraint written in Java (and implementing the interface provided by JUniverse).

Base classes

class IUniverseConstraint

Public static functions

static auto of(easyjni::JavaObject constraint) -> Universe::IUniverseConstraint*

Constructors, destructors, conversion operators

~UniverseJavaConstraint() defaulted override

Public functions

auto operator*() -> easyjni::JavaObject
auto scope() -> const std::vector<Universe::IUniverseVariable*>& override
void setIgnored(bool ignored) override
auto isIgnored() const -> const bool override
auto getScore() const -> const double override

Function documentation

static Universe::IUniverseConstraint* Universe::UniverseJavaConstraint::of(easyjni::JavaObject constraint)

Parameters
constraint The existing Java object.
Returns The wrapper for the object.

Creates a new UniverseJavaConstraint from an existing Java object that is an instance of IUniverseConstraint.

Universe::UniverseJavaConstraint::~UniverseJavaConstraint() override defaulted

Destroys this UniverseJavaConstraint.

easyjni::JavaObject Universe::UniverseJavaConstraint::operator*()

Returns The wrapped Java object.

Gives the Java object that is wrapped in this UniverseJavaConstraint.

const std::vector<Universe::IUniverseVariable*>& Universe::UniverseJavaConstraint::scope() override

Returns The variables involved in this constraint.

Gives the scope of this constraint, i.e., the variables that appear in this constraint.

void Universe::UniverseJavaConstraint::setIgnored(bool ignored) override

Parameters
ignored Whether the constraint should be ignored.

Sets whether this constraint must be ignored by the solver.

const bool Universe::UniverseJavaConstraint::isIgnored() const override

Returns Whether the constraint should be ignored.

Checks whether this constraint must be ignored by the solver.

const double Universe::UniverseJavaConstraint::getScore() const override

Returns The score of the constraint.

Gives the score of this constraint, as computed by the solver.