Interface BooleanEncodedValue

All Superinterfaces:
Comparable<EncodedValue>, EncodedValue
All Known Implementing Classes:
BaseBooleanEncodedValue, BuilderEncodedValues.BuilderBooleanEncodedValue, ImmutableBooleanEncodedValue

public interface BooleanEncodedValue extends EncodedValue
This class represents an encoded boolean value.
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    Compare this BooleanEncodedValue to another EncodedValue.
    boolean
    Compares this BooleanEncodedValue to another BooleanEncodedValue for equality.
    boolean
    Gets the boolean value.
    int
    Returns a hashcode for this EncodedBooleanValue.

    Methods inherited from interface org.jf.dexlib2.iface.value.EncodedValue

    getValueType
  • Method Details

    • 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 Object
      Returns:
      The hash code value for this EncodedBooleanValue
    • equals

      boolean equals(@Nullable 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 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 Comparable<EncodedValue>
      Parameters:
      o - The EncodedValue to compare with this BooleanEncodedValue
      Returns:
      An integer representing the result of the comparison