|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.rim.device.api.util.AbstractStringWrapper
public abstract class AbstractStringWrapper
Wraps string data to provide consistent basis for the string utility methods
defined in AbstractString
.
This class can wrap a String
,
a StringBuffer
, or a character array. To be thrifty with
runtime storage you can instantiate one wrapper, and re-use it on different
string data.
Constructor Summary | ||
---|---|---|
protected |
AbstractStringWrapper()
Creates new AbstractStringWrapper instance. |
Method Summary | ||
---|---|---|
static AbstractStringWrapper |
createInstance(Object string)
Retrieves an abstract string wrapper for provided string data. |
|
int |
hashCode()
Retrieves hash code for this wrapper's enclosed string data. |
|
abstract void |
reset(Object string)
Wraps new string with this wrapper. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface net.rim.device.api.util.AbstractString |
---|
charAt, getChars, indexOf, length |
Constructor Detail |
---|
protected AbstractStringWrapper()
Method Detail |
---|
public static AbstractStringWrapper createInstance(Object string) throws IllegalArgumentException
Invoke this method to wrap string data of some kind and gain access
to the various utility methods defined in this class and in AbstractString
.
string
- String data to wrap; may be a String
, a
StringBuffer
, or a character array.
IllegalArgumentException
- If string parameter is not of expected type.public abstract void reset(Object string) throws IllegalArgumentException
Use this method to avoid creating a new wrapper instance.
string
- New string to wrap; may be a String
, a
StringBuffer
, or a character array.
IllegalArgumentException
- If string parameter is not of expected type.public int hashCode()
Invoking this method is equivalent to invoking
(this.toString()).hashCode()
.
hashCode
in class Object
Object.equals(java.lang.Object)
,
Hashtable
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Copyright 1999-2011 Research In Motion Limited. 295 Phillip Street, Waterloo, Ontario, Canada, N2L 3W8. All Rights Reserved.
Java is a trademark of Oracle America Inc. in the US and other countries.
Legal