com.groupdocs.metadata.core

Interfaces

Classes

Enums

Exceptions

com.groupdocs.metadata.core

Class ReadOnlyList<T>

  • All Implemented Interfaces:
    IReadOnlyList<T>, Iterable<T>


    public class ReadOnlyList<T>
    extends Object
    implements IReadOnlyList<T>

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

    T: The type of the element.

    • Method Detail

      • getCount

        public final int getCount()

        Gets the number of elements contained in the collection.

        Specified by:
        getCount in interface IReadOnlyList<T>
        Returns:
        The number of elements contained in the collection.
      • get_Item

        public final T get_Item(int index)

        Gets the element at the specified index in the collection.

        Specified by:
        get_Item in interface IReadOnlyList<T>
        Parameters:
        index - The zero-based index of the element to get.
        Returns:
        The element at the specified index.
      • contains

        public final boolean contains(T item)

        Determines whether the collection contains a specific item.

        Specified by:
        contains in interface IReadOnlyList<T>
        Parameters:
        item - The item to locate in the collection.
        Returns:
        True if the item is found in the collection; otherwise, false.
      • indexOf

        public final int indexOf(T item)

        Determines the index of a specific item in the collection.

        Specified by:
        indexOf in interface IReadOnlyList<T>
        Parameters:
        item - The item to locate in the collection.
        Returns:
        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.

        Specified by:
        iterator in interface Iterable<T>
        Returns:
        An IEnumerator{T} object that can be used to iterate through the collection.