|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.util.AbstractCollection
java.util.AbstractList
com.intersys.objects.SList
This class implements client side representation for Cache $LIST data type. Created: Wed Oct 10 05:41:25 2001
Constructor Summary | |
SList()
|
|
SList(Object list)
Creates a new SList wrapped around given SysList object and sets encoding to default. |
|
SList(Object list,
boolean doNotChangeLocale)
Creates a new SList wrapped around given SysList object. |
Method Summary | |
boolean |
add(Object o)
Adds a single object to the end of SList . |
boolean |
addAll(Collection c)
|
static SList |
build(boolean o)
Creates a SList containing a single boolean value. |
static SList |
build(byte o)
Creates a SList containing a single byte. |
static SList |
build(char o)
Creates a SList containing a single byte. |
static SList |
build(double o)
Creates a SList containing a single double value. |
static SList |
build(float o)
Creates a SList containing a single float value. |
static SList |
build(int o)
Creates a SList containing a single integer. |
static SList |
build(long o)
Creates a SList containing a single long. |
static SList |
build(Object o)
Creates a SList containing a single object. |
static SList |
buildAll(Collection c)
Creates a SList containing all elements from collection
c . |
void |
clear()
|
boolean |
equals(Object o)
|
Object |
get(int index)
|
Object |
getAs(int index,
Class clazz)
Returns object at index index represented as object
of a class clazz . |
Object |
getAs(int index,
Object obj)
Returns object at index index represented as object
of the same type as obj . |
Object |
getAs(int index,
String type)
Returns object at index index represented as object
of type type . |
byte[] |
getData()
|
void |
setEncoding(String encoding)
|
int |
size()
|
SList |
sublist(int start,
int end)
Returns the SList consiting of items of this
SList starting with start and eding
with end - 1 . |
String |
toString()
|
Methods inherited from class java.util.AbstractList |
add, addAll, hashCode, indexOf, iterator, lastIndexOf, listIterator, listIterator, remove, set, subList |
Methods inherited from class java.util.AbstractCollection |
contains, containsAll, isEmpty, remove, removeAll, retainAll, toArray, toArray |
Methods inherited from class java.lang.Object |
getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface java.util.List |
contains, containsAll, isEmpty, remove, removeAll, retainAll, toArray, toArray |
Constructor Detail |
public SList()
public SList(Object list)
list
- SysList objectpublic SList(Object list, boolean doNotChangeLocale)
list
- SysList objectdoNotChangeLocale
- if true
does not change
encoding of underlined list object.Method Detail |
public void setEncoding(String encoding)
public Object getAs(int index, String type) throws CacheException
index
represented as object
of type type
.
index
- index in listtype
- name of desired return type
index
represented as object
of type type
CacheException
- if data in the list at specified index
can not be represented as type
public Object getAs(int index, Class clazz) throws CacheException
index
represented as object
of a class clazz
.
index
- index in listclazz
- specification of return type.
index
represented as object
of type type
CacheException
- if data in the list at specified index
can not be represented as type, specified by clazz
public Object getAs(int index, Object obj) throws CacheException
index
represented as object
of the same type as obj
.
index
- index in list. Index of the first element in list
is 0 to conform with method get
defined in
java.util.List
interface.obj
- used only for obtaining type.
index
represented as object
of type type
CacheException
- if data in the list at specified index
can not be represented as the same type as obj
public Object get(int index)
public int size()
public String toString()
public SList sublist(int start, int end)
SList
consiting of items of this
SList
starting with start
and eding
with end - 1
.
start
- the first element of this List to be copied to the
target Listend
- the element after the last element of this List that
was copied to target List.
SList
object which is a sublist of this
List.public byte[] getData()
public boolean add(Object o)
SList
.
o
- A single object of one of supported types or a
collection of objects.
true
.List.add(java.lang.Object)
,
build(java.lang.Object)
,
addAll(java.util.Collection)
public boolean addAll(Collection c)
public static SList build(Object o)
SList
containing a single object.
o
- An object of one of supported types or a collection of
objects.
SList
object which contains a single object.add(java.lang.Object)
,
buildAll(java.util.Collection)
public static SList build(char o)
SList
containing a single byte.
o
- A char to add to the SList
SList
object which contains a single
object of type char.buildAll(java.util.Collection)
public static SList build(byte o)
SList
containing a single byte.
o
- A byte to add to the SList
SList
object which contains a single
object of type byte.buildAll(java.util.Collection)
public static SList build(int o)
SList
containing a single integer.
o
- An integer to add to the SList
SList
object which contains a single
object of type Integer.buildAll(java.util.Collection)
public static SList build(long o)
SList
containing a single long.
o
- A long value to add to the SList
SList
object which contains a single
object of type Integer.buildAll(java.util.Collection)
public static SList build(float o)
SList
containing a single float value.
o
- A float value to add to the SList
SList
object which contains a single
object of type Double.buildAll(java.util.Collection)
public static SList build(double o)
SList
containing a single double value.
o
- A double value to add to the SList
SList
object which contains a single object of type Double.buildAll(java.util.Collection)
public static SList build(boolean o)
SList
containing a single boolean value.
o
- A boolean value to add to the SList
SList
object which contains a single
object of type Boolean.buildAll(java.util.Collection)
public static SList buildAll(Collection c)
SList
containing all elements from collection
c
. All elements in collection must be of supported
types.
c
- a collection of elements to add to SList
.
SList
object which contains all elements from
collection c
build(java.lang.Object)
public void clear()
public boolean equals(Object o)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |