Files
mercury/java/runtime/MercuryEnum.java
Mark Brown d465fa53cb Update the COPYING.LIB file and references to it.
Discussion of these changes can be found on the Mercury developers
mailing list archives from June 2018.

COPYING.LIB:
    Add a special linking exception to the LGPL.

*:
    Update references to COPYING.LIB.

    Clean up some minor errors that have accumulated in copyright
    messages.
2018-06-09 17:43:12 +10:00

30 lines
711 B
Java

//
// Copyright (C) 2009 The University of Melbourne.
// Copyright (C) 2018 The Mercury team.
// This file is distributed under the terms specified in COPYING.LIB.
//
// This is the superclass of all classes generated by the Java back-end
// which correspond to Mercury-defined enumeration types.
//
package jmercury.runtime;
public abstract class MercuryEnum {
public final int MR_value;
protected MercuryEnum(int val) {
MR_value = val;
}
@Override
public boolean equals(Object o) {
return o != null && o instanceof MercuryEnum &&
((MercuryEnum)o).MR_value == this.MR_value;
}
@Override
public int hashCode() {
return MR_value;
}
}