Interface ReadOnlyStrictList<E>

All Superinterfaces:
com.google.gwt.user.client.rpc.IsSerializable, Iterable<E>, IterableWithSize<E>, ReadOnlyStrictCollection<E>, Serializable
All Known Subinterfaces:
StrictList<E>
All Known Implementing Classes:
ImmutableStrictList, StrictListImpl

public interface ReadOnlyStrictList<E> extends ReadOnlyStrictCollection<E>
Since:
3.9.0
  • Method Details

    • indexOf

      int indexOf(@Nullable E element)
      Returns:
      -1 if the element is not in the collection
    • indexOfInstance

      int indexOfInstance(@Nullable E instance, int lastKnownIndex)
      Searches the given instance using the == operator instead of equals().
      Parameters:
      lastKnownIndex - - last known index for optimized search, use -1 if not know
      Returns:
      -1 if the element is not in the collection
    • get

      @NotNull E get(int index)
    • getLast

      @NotNull E getLast()
    • asList

      @NotNull List<E> asList()
      Returns the adapter to List interface for use with 3rd party code or standard Java libraries. Unlike the IterableWithSize.toArrayList() which returns new list containing the same elements, this method returns live "view" of this list instance meaning that changes done to the returned instance are reflected also in the original list. Unless the original list is immutable, in which case all methods modifying the content throw UnsupportedOperationException The returned list is Serializable
    • toImmutable

      @NotNull ImmutableStrictList<E> toImmutable()
    • toTransformed

      @NotNull <T> ReadOnlyStrictList<T> toTransformed(@NotNull NotStrictTransformer<E,T> transformer)
      Description copied from interface: ReadOnlyStrictCollection
      Each element from the collection will be transformed or skipped (if transformer returns null)
      Specified by:
      toTransformed in interface ReadOnlyStrictCollection<E>
      Type Parameters:
      T - type of elements in transformed collection
      Parameters:
      transformer - transformer
      Returns:
      transformed collection
      Since:
      3.10.0
    • toTransformed

      @NotNull <T> ReadOnlyStrictList<T> toTransformed(@NotNull StrictTransformer<E,T> transformer)
      Description copied from interface: ReadOnlyStrictCollection
      Each element from the collection will be transformed.
      Specified by:
      toTransformed in interface ReadOnlyStrictCollection<E>
      Type Parameters:
      T - type of elements in transformed collection
      Parameters:
      transformer - transformer
      Returns:
      transformed collection
      Since:
      3.10.0