Package org.jf.dexlib2.base.reference
Class BaseStringReference
java.lang.Object
org.jf.dexlib2.base.reference.BaseReference
org.jf.dexlib2.base.reference.BaseStringReference
- All Implemented Interfaces:
CharSequence,Comparable<CharSequence>,Reference,StringReference
- Direct Known Subclasses:
BuilderStringReference,DexBackedStringReference,ImmutableStringReference
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.jf.dexlib2.iface.reference.Reference
Reference.InvalidReferenceException -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncharcharAt(int index) intCompare this StringReference to another StringReference, or more generally to another CharSequence.booleanCompares this StringReference to another CharSequence for equality.inthashCode()Returns a hashcode for this StringReference.intlength()subSequence(int start, int end) toString()Methods inherited from class org.jf.dexlib2.base.reference.BaseReference
validateReferenceMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.lang.CharSequence
chars, codePoints, isEmptyMethods inherited from interface org.jf.dexlib2.iface.reference.Reference
validateReferenceMethods inherited from interface org.jf.dexlib2.iface.reference.StringReference
getString
-
Constructor Details
-
BaseStringReference
public BaseStringReference()
-
-
Method Details
-
hashCode
public int hashCode()Description copied from interface:StringReferenceReturns a hashcode for this StringReference. This is defined to be getString().hashCode().- Specified by:
hashCodein interfaceStringReference- Overrides:
hashCodein classObject- Returns:
- The hash code value for this StringReference
-
equals
Description copied from interface:StringReferenceCompares this StringReference to another CharSequence for equality. String StringReference is equal to a CharSequence iff this.getString().equals(other.toString()). Equivalently, This StringReference is equal to another StringReference iff this.getString().equals(other.getString()).- Specified by:
equalsin interfaceStringReference- Overrides:
equalsin classObject- Parameters:
o- The object to be compared for equality with this TypeReference- Returns:
- true if the specified object is equal to this TypeReference
-
compareTo
Description copied from interface:StringReferenceCompare this StringReference to another StringReference, or more generally to another CharSequence. The comparison is defined to be this.getString().compareTo(other.toString()).- Specified by:
compareToin interfaceComparable<CharSequence>- Specified by:
compareToin interfaceStringReference- Parameters:
o- The CharSequence to compare with this StringReference- Returns:
- An integer representing the result of the comparison
-
length
public int length()- Specified by:
lengthin interfaceCharSequence
-
charAt
public char charAt(int index) - Specified by:
charAtin interfaceCharSequence
-
subSequence
- Specified by:
subSequencein interfaceCharSequence
-
toString
- Specified by:
toStringin interfaceCharSequence- Overrides:
toStringin classObject
-