jp.digitalmuseum.utils
クラス Array<T>
java.lang.Object
jp.digitalmuseum.utils.Array<T>
-
すべての実装されたインタフェース:
- java.io.Serializable, java.lang.Iterable<T>
-
public class Array<T>
- extends java.lang.Object
- implements java.lang.Iterable<T>, java.io.Serializable
Array with variable length.
- 作成者:
- Jun KATO
- 関連項目:
- 直列化された形式
メソッドの概要 |
java.util.List<T> |
asList()
Return this array as a List object. |
void |
clear()
Clear all elements. |
boolean |
contains(T e)
|
T |
get(int index)
Get an element. |
void |
insert(T e,
int index)
Insert an element to the specified index. |
java.util.Iterator<T> |
iterator()
|
void |
push(T e)
Push an element. |
void |
put(T e,
int index)
Put an element to the specified index. |
void |
realloc(int length)
Extend the holder size to the specified length. |
void |
remove(int index)
Remove an element. |
boolean |
remove(T e)
Remove a specified element. |
int |
size()
Returns the number of elements. |
クラス java.lang.Object から継承されたメソッド |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
INITIAL_SIZE
public static final int INITIAL_SIZE
- 関連項目:
- 定数フィールド値
Array
public Array()
Array
public Array(Array<T> old)
realloc
public void realloc(int length)
- Extend the holder size to the specified length.
size
public int size()
- Returns the number of elements.
clear
public void clear()
- Clear all elements.
put
public void put(T e,
int index)
- Put an element to the specified index.
insert
public void insert(T e,
int index)
- Insert an element to the specified index.
push
public void push(T e)
- Push an element.
contains
public boolean contains(T e)
remove
public void remove(int index)
- Remove an element.
remove
public boolean remove(T e)
- Remove a specified element.
get
public T get(int index)
- Get an element.
asList
public java.util.List<T> asList()
- Return this array as a List object.
iterator
public java.util.Iterator<T> iterator()
- 定義:
- インタフェース
java.lang.Iterable<T>
内の iterator
Copyright by Jun KATO (arc@dmz) at https://mr.digitalmuseum.jp/