Package org.jf.dexlib2.iface.value
Interface BooleanEncodedValue
-
- All Superinterfaces:
java.lang.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
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.-
Methods inherited from interface org.jf.dexlib2.iface.value.EncodedValue
getValueType
-
-
-
-
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 classjava.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 classjava.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 interfacejava.lang.Comparable<EncodedValue>
- Parameters:
o
- The EncodedValue to compare with this BooleanEncodedValue- Returns:
- An integer representing the result of the comparison
-
-