IReadOnlyList
Leave feedback
On this page
All Implemented Interfaces: java.lang.Iterable
public interface IReadOnlyList<T> extends Iterable<T>
Represents a read-only collection of elements that can be accessed by index.
T : The type of elements in the read-only list.
| 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 read-only list. |
| indexOf(T item) | Determines the index of a specific item 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. |
public abstract int getCount()
Gets the number of elements contained in the collection.
Returns: int - The number of elements contained in the collection.
public abstract T get_Item(int index)
Gets the element at the specified index in the read-only list.
Parameters:
| Parameter | Type | Description |
|---|---|---|
| index | int | The zero-based index of the element to get. |
Returns: T - The element at the specified index in the read-only list.
public abstract 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.
public abstract 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.
public abstract 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.
Was this page helpful?
Any additional feedback you'd like to share with us?
Please tell us how we can improve this page.
Thank you for your feedback!
We value your opinion. Your feedback will help us improve our documentation.