public class Onground { private Ground ground; private Position position; public Onground(Ground ground, Position position) { this.ground = ground; this.position = position; } public boolean getOnground() { return ((this.ground.getValue() == true) && (this.position.getValue().getValue() <= 0.0)); } }