Class DefaultHashCodeStrategy

java.lang.Object
org.jvnet.basicjaxb.lang.DefaultHashCodeStrategy
All Implemented Interfaces:
HashCodeStrategy
Direct Known Subclasses:
JAXBHashCodeStrategy

public class DefaultHashCodeStrategy extends Object implements HashCodeStrategy
  • Constructor Details

    • DefaultHashCodeStrategy

      public DefaultHashCodeStrategy()
    • DefaultHashCodeStrategy

      public DefaultHashCodeStrategy(int multiplierNonZeroOddNumber)
  • Method Details

    • getInstance

      public static DefaultHashCodeStrategy getInstance()
    • getLogger

      public org.slf4j.Logger getLogger()
      Specified by:
      getLogger in interface HashCodeStrategy
    • isDebugEnabled

      public boolean isDebugEnabled()
      Specified by:
      isDebugEnabled in interface HashCodeStrategy
    • isTraceEnabled

      public boolean isTraceEnabled()
      Specified by:
      isTraceEnabled in interface HashCodeStrategy
    • debug

      public void debug(String message)
      Subclasses can override this method to log the debug message, as desired.
      Parameters:
      message - The debug message of copied values.
    • trace

      public void trace(String message)
      Subclasses can override this method to log the trace message, as desired.
      Parameters:
      message - The trace message of copied values.
    • observe

      protected int observe(ObjectLocator locator, int hash)
      Observe an int hash and its locator.
      Parameters:
      locator - The object locator.
      hash - The object.
      Returns:
      The original object.
    • observe

      protected int observe(String label, ObjectLocator locator, int hash)
      Observe an int hash and its locator.
      Parameters:
      label - A prefix for the observation message.
      locator - The object locator.
      hash - The hash integer.
      Returns:
      The original hash.
    • buildMessage

      protected String buildMessage(String label, ObjectLocator locator, String value)
    • hashCode

      protected int hashCode(ObjectLocator locator, int hashCode, Object object)
    • hashCodeInternal

      protected int hashCodeInternal(ObjectLocator locator, int hashCode, Object value)
    • hashCodeInternal

      protected int hashCodeInternal(ObjectLocator locator, int hashCode, Enum<?> value)
    • hashCodeInternal

      protected int hashCodeInternal(ObjectLocator locator, int hashCode, HashCode object)
    • hashCode

      protected int hashCode(ObjectLocator locator, int hashCode, Object[] value)
    • hashCodeInternal

      protected int hashCodeInternal(ObjectLocator locator, int hashCode, Enum<?>[] value)
    • hashCodeInternal

      protected int hashCodeInternal(ObjectLocator locator, int hashCode, HashCode[] value)
    • hashCode

      protected int hashCode(ObjectLocator locator, int hashCode, boolean value)
    • hashCode

      protected int hashCode(ObjectLocator locator, int hashCode, byte value)
    • hashCode

      protected int hashCode(ObjectLocator locator, int hashCode, char value)
    • hashCode

      protected int hashCode(ObjectLocator locator, int hashCode, double value)
    • hashCode

      protected int hashCode(ObjectLocator locator, int hashCode, float value)
    • hashCode

      protected int hashCode(ObjectLocator locator, int hashCode, int value)
    • hashCode

      protected int hashCode(ObjectLocator locator, int hashCode, long value)
    • hashCode

      protected int hashCode(ObjectLocator locator, int hashCode, short value)
    • hashCode

      protected int hashCode(ObjectLocator locator, int hashCode, boolean[] value)
    • hashCode

      protected int hashCode(ObjectLocator locator, int hashCode, byte[] value)
    • hashCode

      protected int hashCode(ObjectLocator locator, int hashCode, char[] value)
    • hashCode

      protected int hashCode(ObjectLocator locator, int hashCode, double[] value)
    • hashCode

      protected int hashCode(ObjectLocator locator, int hashCode, float[] value)
    • hashCode

      protected int hashCode(ObjectLocator locator, int hashCode, int[] value)
    • hashCode

      protected int hashCode(ObjectLocator locator, int hashCode, long[] value)
    • hashCode

      protected int hashCode(ObjectLocator locator, int hashCode, short[] value)
    • hashCode

      public int hashCode(ObjectLocator locator, int hashCode, boolean value, boolean valueSet)
      Specified by:
      hashCode in interface HashCodeStrategy
    • hashCode

      public int hashCode(ObjectLocator locator, int hashCode, byte value, boolean valueSet)
      Specified by:
      hashCode in interface HashCodeStrategy
    • hashCode

      public int hashCode(ObjectLocator locator, int hashCode, char value, boolean valueSet)
      Specified by:
      hashCode in interface HashCodeStrategy
    • hashCode

      public int hashCode(ObjectLocator locator, int hashCode, double value, boolean valueSet)
      Specified by:
      hashCode in interface HashCodeStrategy
    • hashCode

      public int hashCode(ObjectLocator locator, int hashCode, float value, boolean valueSet)
      Specified by:
      hashCode in interface HashCodeStrategy
    • hashCode

      public int hashCode(ObjectLocator locator, int hashCode, int value, boolean valueSet)
      Specified by:
      hashCode in interface HashCodeStrategy
    • hashCode

      public int hashCode(ObjectLocator locator, int hashCode, long value, boolean valueSet)
      Specified by:
      hashCode in interface HashCodeStrategy
    • hashCode

      public int hashCode(ObjectLocator locator, int hashCode, short value, boolean valueSet)
      Specified by:
      hashCode in interface HashCodeStrategy
    • hashCode

      public int hashCode(ObjectLocator locator, int hashCode, Object value, boolean valueSet)
      Specified by:
      hashCode in interface HashCodeStrategy
    • hashCode

      public int hashCode(ObjectLocator locator, int hashCode, boolean[] value, boolean valueSet)
      Specified by:
      hashCode in interface HashCodeStrategy
    • hashCode

      public int hashCode(ObjectLocator locator, int hashCode, byte[] value, boolean valueSet)
      Specified by:
      hashCode in interface HashCodeStrategy
    • hashCode

      public int hashCode(ObjectLocator locator, int hashCode, char[] value, boolean valueSet)
      Specified by:
      hashCode in interface HashCodeStrategy
    • hashCode

      public int hashCode(ObjectLocator locator, int hashCode, double[] value, boolean valueSet)
      Specified by:
      hashCode in interface HashCodeStrategy
    • hashCode

      public int hashCode(ObjectLocator locator, int hashCode, float[] value, boolean valueSet)
      Specified by:
      hashCode in interface HashCodeStrategy
    • hashCode

      public int hashCode(ObjectLocator locator, int hashCode, int[] value, boolean valueSet)
      Specified by:
      hashCode in interface HashCodeStrategy
    • hashCode

      public int hashCode(ObjectLocator locator, int hashCode, long[] value, boolean valueSet)
      Specified by:
      hashCode in interface HashCodeStrategy
    • hashCode

      public int hashCode(ObjectLocator locator, int hashCode, short[] value, boolean valueSet)
      Specified by:
      hashCode in interface HashCodeStrategy
    • hashCode

      public int hashCode(ObjectLocator locator, int hashCode, Object[] value, boolean valueSet)
      Specified by:
      hashCode in interface HashCodeStrategy