![JAR search and dependency download from the Maven repository](/logo.png)
main.io.github.moonlightsuite.moonlight.domain.IntegerDomain Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of moonlight-engine Show documentation
Show all versions of moonlight-engine Show documentation
MoonLight is a light-weight Java-tool for monitoring temporal, spatial and spatio-temporal properties of distributed complex systems, such as Cyber-Physical Systems and Collective Adaptive Systems.
The newest version!
package io.github.moonlightsuite.moonlight.domain;
import io.github.moonlightsuite.moonlight.core.space.DistanceDomain;
import java.util.Objects;
public class IntegerDomain implements DistanceDomain {
@Override
public Integer zero() {
return 0;
}
@Override
public Integer infinity() {
return Integer.MAX_VALUE;
}
@Override
public Integer sum(Integer x, Integer y) {
return x + y;
}
@Override
public Integer multiply(Integer x, int factor) {
return x * factor;
}
@Override
public boolean less(Integer x, Integer y) {
return x < y;
}
@Override
public boolean equalTo(Integer x, Integer y) {
return Objects.equals(x, y);
}
@Override
public boolean lessOrEqual(Integer x, Integer y) {
return x <= y;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy