Interface StringEncodedValue

All Superinterfaces:
Comparable<EncodedValue>, EncodedValue
All Known Implementing Classes:
BaseStringEncodedValue, BuilderEncodedValues.BuilderStringEncodedValue, DexBackedStringEncodedValue, ImmutableStringEncodedValue

public interface StringEncodedValue extends EncodedValue
This class represents an encoded string value.
  • Method Summary

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

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

    getValueType
  • Method Details

    • getValue

      @Nonnull String getValue()
      Gets the string value.
      Returns:
      the string value
    • hashCode

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

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

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