|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjfun.yan.element.AnyArrayStore<T>
public class AnyArrayStore<T>
This class stores component instances into any array. For a primitive array such as int[], wrapper objects are automatically unboxed.
| Constructor Summary | |
|---|---|
AnyArrayStore(java.lang.Object arr)
To create an AnyArrayStore object. |
|
AnyArrayStore(java.lang.Object arr,
int begin)
To create an AnyArrayStore object. |
|
AnyArrayStore(java.lang.Object arr,
int begin,
int end)
To create an AnyArrayStore object. |
|
| Method Summary | |
|---|---|
boolean |
equals(java.lang.Object obj)
|
java.lang.Object |
getArrayObject()
Get the array object that stores the elements. |
int |
getBegin()
Get the begin index. |
int |
getEnd()
Get the non-inclusive end index. |
protected int |
getIndex(int ind)
Map an element to the real index on the array. |
int |
hashCode()
|
void |
storeElement(int ind,
T obj)
Store an element. |
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public AnyArrayStore(java.lang.Object arr,
int begin,
int end)
arr - the array objectbegin - the begin index of the array.
Elements are stored from this index.end - the non-inclusive end index.
Elements cannot be stored at or after this index.
public AnyArrayStore(java.lang.Object arr,
int begin)
arr - the array objectbegin - the begin index of the array.
Elements are stored from this index.public AnyArrayStore(java.lang.Object arr)
arr - the array object| Method Detail |
|---|
public java.lang.Object getArrayObject()
public int getBegin()
public int getEnd()
public void storeElement(int ind,
T obj)
ElementStore
storeElement in interface ElementStore<T>ind - the element index.obj - the element value.protected final int getIndex(int ind)
ind - the index.
java.lang.ArrayIndexOutOfBoundsException - if the index is not within the [begin,end) range.public boolean equals(java.lang.Object obj)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Objectpublic java.lang.String toString()
toString in class java.lang.Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||