Class Equality

java.lang.Object
org.microbean.lang.Equality
All Implemented Interfaces:
Constable
Direct Known Subclasses:
SameTypeEquality

public class Equality extends Object implements Constable
Provides determinate hashcode and equality calculations chiefly for javax.lang.model implementations.
Author:
Laird Nelson
See Also:
  • Constructor Details

    • Equality

      public Equality(boolean includeAnnotations)
      Creates a new Equality.
      Parameters:
      includeAnnotations - whether annotations on objects should be taken into consideration while performing hashcode and equality operations
      See Also:
  • Method Details

    • includeAnnotations

      public final boolean includeAnnotations()
    • describeConstable

      public Optional<DynamicConstantDesc<? extends Equality>> describeConstable()
      Specified by:
      describeConstable in interface Constable
    • hashCode

      public int hashCode(Object o1)
    • equals

      public boolean equals(Object o1, Object o2)
    • hashCodeIncludingAnnotations

      public static final int hashCodeIncludingAnnotations(Object o)
    • hashCodeNotIncludingAnnotations

      public static final int hashCodeNotIncludingAnnotations(Object o)
    • hashCode

      public static final int hashCode(Object o, boolean ia)
    • equalsIncludingAnnotations

      public static final boolean equalsIncludingAnnotations(Object o1, Object o2)
    • equalsNotIncludingAnnotations

      public static final boolean equalsNotIncludingAnnotations(Object o1, Object o2)
    • equals

      public static final boolean equals(Object o1, Object o2, boolean ia)