ReadOnlyList

Inheritance: java.lang.Object

All Implemented Interfaces: com.groupdocs.metadata.core.IReadOnlyList

public class ReadOnlyList<T> implements IReadOnlyList<T>

Provides an abstract base class for a strongly typed read-only list.

T : The type of the element.

Methods

Method Description
getCount() Gets the number of elements contained in the collection.
get_Item(int index) Gets the element at the specified index in the collection.
contains(T item) Determines whether the collection contains a specific item.
contains(TagCategory item) Determines whether the collection contains a TagCategory item.
indexOf(T item) Determines the index of a specific item in the collection.
iterator() Returns an enumerator that iterates through a collection.

getCount()

public final int getCount()

Gets the number of elements contained in the collection.

Returns: int - The number of elements contained in the collection.

get_Item(int index)

public final T get_Item(int index)

Gets the element at the specified index in the collection.

Parameters:

Parameter Type Description
index int The zero-based index of the element to get.

Returns: T - The element at the specified index.

contains(T item)

public final boolean contains(T item)

Determines whether the collection contains a specific item.

Parameters:

Parameter Type Description
item T The item to locate in the collection.

Returns: boolean - True if the item is found in the collection; otherwise, false.

contains(TagCategory item)

public final boolean contains(TagCategory item)

Determines whether the collection contains a TagCategory item.

Parameters:

Parameter Type Description
item TagCategory The item to locate in the collection.

Returns: boolean - True if the item is found in the collection; otherwise, false.

indexOf(T item)

public final int indexOf(T item)

Determines the index of a specific item in the collection.

Parameters:

Parameter Type Description
item T The item to locate in the collection.

Returns: int - The index of item if found in the collection; otherwise, -1.

iterator()

public final Iterator<T> iterator()

Returns an enumerator that iterates through a collection.

Returns: java.util.Iterator - An IEnumerator{T} object that can be used to iterate through the collection.