Top Fields Constructors Methods
org.osgi.util.converter

pack-priv Class ArrayDelegate<T>

extends AbstractCollectionDelegate<T>
implements List<T>
Class Inheritance
All Implemented Interfaces
java.util.List, java.util.SequencedCollection, java.util.Collection, java.lang.Iterable
Imports
java.lang.reflect.Array, java.util.List

Author
$Id: 85bde19d5a5039481128a653e8f56f1cebaabfcb $

Field Summary

Modifier and TypeField and Description
private final Object

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
public T
get(int
index of the element to return
index
)

Implements java.util.List.get.

Returns the element at the specified position in this list.

public boolean
isEmpty()

Implements java.util.List.isEmpty.

Returns true if this list contains no elements.

public int
size()

Implements java.util.List.size.

Returns the number of elements in this list.

public Object[]
toArray()

Implements java.util.List.toArray.

Returns an array containing all of the elements in this list in proper sequence (from first to last element).

Inherited from org.osgi.util.converter.AbstractCollectionDelegate:
addaddaddAlladdAllclearcontainscontainsAllindexOfiteratorlastIndexOflistIteratorlistIteratorremoveremoveremoveAllretainAllsetsubListtoArray

Field Detail

backingArrayback to summary
private final Object backingArray

Constructor Detail

ArrayDelegateback to summary
pack-priv ArrayDelegate(Object arr)

Method Detail

getback to summary
public T get(int index)

Implements java.util.List.get.

Doc from java.util.List.get.

Returns the element at the specified position in this list.

Parameters
index:int

index of the element to return

Returns:T

the element at the specified position in this list

Annotations
@SuppressWarnings:unchecked
@Override
isEmptyback to summary
public boolean isEmpty()

Implements java.util.List.isEmpty.

Doc from java.util.List.isEmpty.

Returns true if this list contains no elements.

Returns:boolean

true if this list contains no elements

Annotations
@Override
sizeback to summary
public int size()

Implements java.util.List.size.

Doc from java.util.List.size.

Returns the number of elements in this list. If this list contains more than Integer.MAX_VALUE elements, returns Integer.MAX_VALUE.

Returns:int

the number of elements in this list

Annotations
@Override
toArrayback to summary
public Object[] toArray()

Implements java.util.List.toArray.

Doc from java.util.List.toArray.

Returns an array containing all of the elements in this list in proper sequence (from first to last element).

The returned array will be "safe" in that no references to it are maintained by this list. (In other words, this method must allocate a new array even if this list is backed by an array). The caller is thus free to modify the returned array.

This method acts as bridge between array-based and collection-based APIs.

Returns:Object[]

an array containing all of the elements in this list in proper sequence

Annotations
@Override