Interface BooleanEncodedValue

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      int compareTo​(EncodedValue o)
      Compare this BooleanEncodedValue to another EncodedValue.
      boolean equals​(java.lang.Object o)
      Compares this BooleanEncodedValue to another BooleanEncodedValue for equality.
      boolean getValue()
      Gets the boolean value.
      int hashCode()
      Returns a hashcode for this EncodedBooleanValue.
    • Method Detail

      • getValue

        boolean getValue()
        Gets the boolean value.
        Returns:
        the boolean value
      • hashCode

        int hashCode()
        Returns a hashcode for this EncodedBooleanValue. This hashCode is defined to be the following:
         
         int hashCode = getValue()?1:0;
         
        Overrides:
        hashCode in class java.lang.Object
        Returns:
        The hash code value for this EncodedBooleanValue
      • equals

        boolean equals​(@Nullable
                       java.lang.Object o)
        Compares this BooleanEncodedValue to another BooleanEncodedValue for equality. This BooleanEncodedValue is equal to another BooleanEncodedValue if the values returned by getValue() are equal.
        Overrides:
        equals in class java.lang.Object
        Parameters:
        o - The object to be compared for equality with this BooleanEncodedValue
        Returns:
        true if the specified object is equal to this BooleanEncodedValue
      • compareTo

        int compareTo​(@Nonnull
                      EncodedValue o)
        Compare this BooleanEncodedValue to another EncodedValue. The comparison is first done on the return values of getValueType(). If the other value is another BooleanEncodedValue, the return values of getValue() are compared, based on the semantics of Boolean.compareTo().
        Specified by:
        compareTo in interface java.lang.Comparable<EncodedValue>
        Parameters:
        o - The EncodedValue to compare with this BooleanEncodedValue
        Returns:
        An integer representing the result of the comparison