Package com.oss.asn1
Class AbstractString
java.lang.Object
com.oss.asn1.AbstractData
com.oss.asn1.AbstractString
- All Implemented Interfaces:
com.oss.asn1.Sizeable
,Serializable
,Cloneable
- Direct Known Subclasses:
AbstractString16
,AbstractString32
,UTF8String
The AbstractString class provides a common ancestor for all of the
ASN.1/Java string classes.
- Since:
- ASN.1/Java 1.0-beta A
- See Also:
-
Field Summary
Fields inherited from class com.oss.asn1.AbstractData
EQUALS, GREATER_THAN, LESS_THAN
-
Method Summary
Modifier and TypeMethodDescriptionfinal int
compareTo
(AbstractString that) Compare 'this' object to another AbstractString object to determine whether the contents of 'this' object is less than, equal to, or greater than the contents of another object.final boolean
equalTo
(AbstractString that) Compare 'this' object to another object to see if their contents are the same.final int
Deprecated.abstract int
getSize()
Get the number of elements in the array of objects.abstract void
setValue
(char[] value) Set the value of 'this' object to an array of char.abstract void
Set the value of 'this' object to a String.abstract String
Get the value of 'this' object as a String.Methods inherited from class com.oss.asn1.AbstractData
clone, delete, equals, getTypeInfo, isEncodable, isPDU, isValid, toString, toString
-
Method Details
-
setValue
Set the value of 'this' object to a String.- Parameters:
value
- the value to set 'this' object to.
-
setValue
public abstract void setValue(char[] value) Set the value of 'this' object to an array of char.- Parameters:
value
- the value to set 'this' object to.
-
stringValue
Get the value of 'this' object as a String. This method is abstract.- Returns:
- the String value of 'this' object.
-
getSize
public abstract int getSize()Get the number of elements in the array of objects.- Specified by:
getSize
in interfacecom.oss.asn1.Sizeable
- Returns:
- number of elements in the array.
-
getLength
Deprecated.Get the length of this string in characters. This method is deprecated. Use thegetSize
method instead.- Returns:
- the length of this string.
-
equalTo
Compare 'this' object to another object to see if their contents are the same.- Parameters:
that
- the AbstractData object to compare 'this' object to.- Returns:
- true if contents of both objects are the same.
-
compareTo
Compare 'this' object to another AbstractString object to determine whether the contents of 'this' object is less than, equal to, or greater than the contents of another object.- Parameters:
that
- AbstractString object that is compared with 'this' object- Returns:
- LESS_THAN, EQUALS, GREATER_THAN values as the results of comparison.
- Throws:
NullPointerException
- thrown when 'that' is null.
-