java.lang.Object
org.wikidata.wdtk.datamodel.helpers.Hash

public class Hash extends Object
Static class for computing a hashcode of arbitrary data objects using only their interfaces. This can be used to implement the hashCode() method of arbitrary interface implementations. More efficient solutions might exist if the object that implements an interface is of a specific known type, but the methods here could always be used as a fallback or default.
Author:
Markus Kroetzsch
  • Constructor Details

    • Hash

      public Hash()
  • Method Details

    • hashCode

      public static int hashCode(EntityIdValue o)
      Returns a hash code for the given object.
      Parameters:
      o - the object to create a hash for
      Returns:
      the hash code of the object
      See Also:
    • hashCode

      public static int hashCode(DatatypeIdValue o)
      Returns a hash code for the given object.
      Parameters:
      o - the object to create a hash for
      Returns:
      the hash code of the object
      See Also:
    • hashCode

      public static int hashCode(TimeValue o)
      Returns a hash code for the given object.
      Parameters:
      o - the object to create a hash for
      Returns:
      the hash code of the object
      See Also:
    • hashCode

      public static int hashCode(GlobeCoordinatesValue o)
      Returns a hash code for the given object.
      Parameters:
      o - the object to create a hash for
      Returns:
      the hash code of the object
      See Also:
    • hashCode

      public static int hashCode(StringValue o)
      Returns a hash code for the given object.
      Parameters:
      o - the object to create a hash for
      Returns:
      the hash code of the object
      See Also:
    • hashCode

      public static int hashCode(MonolingualTextValue o)
      Returns a hash code for the given object.
      Parameters:
      o - the object to create a hash for
      Returns:
      the hash code of the object
      See Also:
    • hashCode

      public static int hashCode(QuantityValue o)
      Returns a hash code for the given object.
      Parameters:
      o - the object to create a hash for
      Returns:
      the hash code of the object
      See Also:
    • hashCode

      public static int hashCode(ValueSnak o)
      Returns a hash code for the given object.
      Parameters:
      o - the object to create a hash for
      Returns:
      the hash code of the object
      See Also:
    • hashCode

      public static int hashCode(SomeValueSnak o)
      Returns a hash code for the given object.
      Parameters:
      o - the object to create a hash for
      Returns:
      the hash code of the object
      See Also:
    • hashCode

      public static int hashCode(NoValueSnak o)
      Returns a hash code for the given object.
      Parameters:
      o - the object to create a hash for
      Returns:
      the hash code of the object
      See Also:
    • hashCode

      public static int hashCode(SnakGroup o)
      Returns a hash code for the given object.
      Parameters:
      o - the object to create a hash for
      Returns:
      the hash code of the object
      See Also:
    • hashCode

      public static int hashCode(Claim o)
      Returns a hash code for the given object.
      Parameters:
      o - the object to create a hash for
      Returns:
      the hash code of the object
      See Also:
    • hashCode

      public static int hashCode(Reference o)
      Returns a hash code for the given object.
      Parameters:
      o - the object to create a hash for
      Returns:
      the hash code of the object
      See Also:
    • hashCode

      public static int hashCode(Statement o)
      Returns a hash code for the given object.
      Parameters:
      o - the object to create a hash for
      Returns:
      the hash code of the object
      See Also:
    • hashCode

      public static int hashCode(StatementGroup o)
      Returns a hash code for the given object.
      Parameters:
      o - the object to create a hash for
      Returns:
      the hash code of the object
      See Also:
    • hashCode

      public static int hashCode(SiteLink o)
      Returns a hash code for the given object.
      Parameters:
      o - the object to create a hash for
      Returns:
      the hash code of the object
      See Also:
    • hashCode

      public static int hashCode(PropertyDocument o)
      Returns a hash code for the given object.
      Parameters:
      o - the object to create a hash for
      Returns:
      the hash code of the object
      See Also:
    • hashCode

      public static int hashCode(ItemDocument o)
      Returns a hash code for the given object.
      Parameters:
      o - the object to create a hash for
      Returns:
      the hash code of the object
      See Also:
    • hashCode

      public static int hashCode(LexemeDocument o)
      Returns a hash code for the given object.
      Parameters:
      o - the object to create a hash for
      Returns:
      the hash code of the object
      See Also:
    • hashCode

      public static int hashCode(FormDocument o)
      Returns a hash code for the given object.
      Parameters:
      o - the object to create a hash for
      Returns:
      the hash code of the object
      See Also:
    • hashCode

      public static int hashCode(SenseDocument o)
      Returns a hash code for the given object.
      Parameters:
      o - the object to create a hash for
      Returns:
      the hash code of the object
      See Also:
    • hashCode

      public static int hashCode(MediaInfoDocument o)
      Returns a hash code for the given object.
      Parameters:
      o - the object to create a hash for
      Returns:
      the hash code of the object
      See Also:
    • hashCode

      public static int hashCode(EntityRedirectDocument o)
      Returns a hash code for the given object.
      Parameters:
      o - the object to create a hash for
      Returns:
      the hash code of the object
      See Also:
    • hashCode

      public static int hashCode(TermUpdate o)
      Calculates hash code for given TermUpdate object.
      Parameters:
      o - the object to create a hash for
      Returns:
      object's hash code
      See Also:
    • hashCode

      public static int hashCode(AliasUpdate o)
      Calculates hash code for given AliasUpdate object.
      Parameters:
      o - the object to create a hash for
      Returns:
      object's hash code
      See Also:
    • hashCode

      public static int hashCode(StatementUpdate o)
      Calculates hash code for given StatementUpdate object.
      Parameters:
      o - the object to create a hash for
      Returns:
      object's hash code
      See Also:
    • hashCode

      public static int hashCode(MediaInfoUpdate o)
      Calculates hash code for given MediaInfoUpdate object.
      Parameters:
      o - the object to create a hash for
      Returns:
      object's hash code
      See Also:
    • hashCode

      public static int hashCode(ItemUpdate o)
      Calculates hash code for given ItemUpdate object.
      Parameters:
      o - the object to create a hash for
      Returns:
      object's hash code
      See Also:
    • hashCode

      public static int hashCode(PropertyUpdate o)
      Calculates hash code for given PropertyUpdate object.
      Parameters:
      o - the object to create a hash for
      Returns:
      object's hash code
      See Also:
    • hashCode

      public static int hashCode(SenseUpdate o)
      Calculates hash code for given SenseUpdate object.
      Parameters:
      o - the object to create a hash for
      Returns:
      object's hash code
      See Also:
    • hashCode

      public static int hashCode(FormUpdate o)
      Calculates hash code for given FormUpdate object.
      Parameters:
      o - the object to create a hash for
      Returns:
      object's hash code
      See Also:
    • hashCode

      public static int hashCode(LexemeUpdate o)
      Calculates hash code for given LexemeUpdate object.
      Parameters:
      o - the object to create a hash for
      Returns:
      object's hash code
      See Also: