package sodium;

public class Unit {
    public static final Unit unit = new Unit();
    Unit() {}

    @Override
    public boolean equals(Object other_) {
        return other_ instanceof Unit;
    }
};

package sodium;

public enum Unit { UNIT };

Use Java 8 enum for the Unit type.