Class NoRehashing<T>
- java.lang.Object
-
- org.processmining.specpp.datastructures.util.NoRehashing<T>
-
- Type Parameters:
T-
- All Implemented Interfaces:
Immutable,ProperlyHashable
- Direct Known Subclasses:
ActivityImpl,DataRequirement,EvaluatorRequirement,HashmapEncoding,StaticHashWrapper,StringStatisticKey,Transition,VariantImpl
public abstract class NoRehashing<T> extends java.lang.Object implements Immutable, ProperlyHashable
A utility base class that precomputes and caches thehashCode()computation and overridesequals. It meets the semantic contract that two subclassing objects of the same type are equal iff their specifiedinternalobjects are equal. IfTis an array type, hashcode and equality are computed element wise.- See Also:
internal
-
-
Constructor Summary
Constructors Constructor Description NoRehashing(T internal)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object o)inthashCode()
-
-
-
Field Detail
-
internal
protected final T internal
The specified object that thehashCodeand equality is based on. It is defined by subclasses.
-
-
Constructor Detail
-
NoRehashing
public NoRehashing(T internal)
-
-
Method Detail
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Specified by:
hashCodein interfaceProperlyHashable- Overrides:
hashCodein classjava.lang.Object
-
-