Schnittstelle LongIterable

Alle Superschnittstellen:
Iterable<Long>
Alle bekannten Unterschnittstellen:
LongCollection, LongList, LongNavigableSet, LongOrderedSet, LongPriorityDequeue, LongPriorityQueue, LongSet, LongSortedSet
Alle bekannten Implementierungsklassen:
AbstractLongCollection, AbstractLongList, AbstractLongPriorityQueue, AbstractLongSet, CopyOnWriteLongArrayList, ImmutableLongList, ImmutableLongOpenHashSet, LongArrayFIFOQueue, LongArrayList, LongArrayPriorityQueue, LongArraySet, LongAVLTreeSet, LongCollections.EmptyCollection, LongCollections.SynchronizedCollection, LongCollections.UnmodifiableCollection, LongHeapPriorityQueue, LongLinkedList, LongLinkedOpenCustomHashSet, LongLinkedOpenHashSet, LongOpenCustomHashSet, LongOpenHashSet, LongPriorityQueues.SynchronizedPriorityDequeue, LongPriorityQueues.SynchronizedPriorityQueue, LongRBTreeSet, LongSets.UnmodifiableSet

public interface LongIterable extends Iterable<Long>
A Type-Specific Iterable that reduces (un)boxing
  • Methodenübersicht

    Modifizierer und Typ
    Methode
    Beschreibung
    default <E> ObjectIterable<E>
    A Helper function to reduce the usage of Streams and allows to convert a Iterable to something else.
    Creates a Async Builder for moving work of the thread.
    default int
    Helper function to reduce stream usage that allows to count the valid elements.
    default LongIterable
    A Helper function to reduce the usage of Streams and allows to filter out duplicated elements
    default LongIterable
    A Helper function to reduce the usage of Streams and allows to filter out unwanted elements
    default long
    Helper function to reduce stream usage that allows to filter for the first match.
    default <E, V extends Iterable<E>>
    ObjectIterable<E>
    flatMap(LongFunction<V> mapper)
    A Helper function to reduce the usage of Streams and allows to convert a Iterable to something else.
    default <E> void
    forEach(E input, ObjectLongConsumer<E> action)
    Helper function to reduce Lambda usage and allow for more method references, since these are faster/cleaner.
    default void
    forEach(Consumer<? super Long> action)
    Veraltet.
    Please use the corresponding type-specific function instead.
    default void
    A Type Specific foreach function that reduces (un)boxing
    default void
    A Indexed forEach implementation that allows you to keep track of how many elements were already iterated over.
    Returns an iterator over elements of type T.
    default LongIterable
    limit(long limit)
    A Helper function to reduce the usage of Streams and allows to limit the amount of elements
    default <E> ObjectIterable<E>
    map(LongFunction<E> mapper)
    A Helper function to reduce the usage of Streams and allows to convert a Iterable to something else.
    default boolean
    Helper function to reduce stream usage that allows to filter for all matches.
    default boolean
    Helper function to reduce stream usage that allows to filter for any matches.
    default boolean
    Helper function to reduce stream usage that allows to filter for no matches.
    default LongIterable
    A Helper function to reduce the usage of Streams and allows to preview elements before they are iterated through
    default <E extends LongCollection>
    E
    pour(E collection)
    A Helper function to reduce the usage of Streams and allows to collect all elements
    default LongList
    A Helper function that reduces the usage of streams and allows to collect all elements as a ArrayList
    default LongSet
    A Helper function that reduces the usage of streams and allows to collect all elements as a LinkedHashSet
    default long
    reduce(long identity, LongLongUnaryOperator operator)
    Performs a reduction on the elements of this Iterable
    default long
    Performs a reduction on the elements of this Iterable
    default LongIterable
    repeat(int repeats)
    A Helper function to reduce the usage of Streams and allows to repeat elements a desired amount of times
    default LongIterable
    A Helper function to reduce the usage of Streams and allows to sort the elements
    A Type Specific Type Splititerator to reduce boxing/unboxing
    default long[]
    A Helper function that reduces the usage of streams and allows to collect all elements as a Array
  • Methodendetails

    • iterator

      LongIterator iterator()
      Returns an iterator over elements of type T.
      Angegeben von:
      iterator in Schnittstelle Iterable<Long>
      Gibt zurück:
      an Iterator.
    • forEach

      default void forEach(LongConsumer action)
      A Type Specific foreach function that reduces (un)boxing
      Parameter:
      action - The action to be performed for each element
      Löst aus:
      NullPointerException - if the specified action is null
      Siehe auch:
      ImplSpec:

      The default implementation behaves as if:

      
      	iterator().forEachRemaining(action);
       
    • forEach

      @Deprecated default void forEach(Consumer<? super Long> action)
      Veraltet.
      Please use the corresponding type-specific function instead.

      This default implementation delegates to the corresponding type-specific function.

      Angegeben von:
      forEach in Schnittstelle Iterable<Long>
    • forEachIndexed

      default void forEachIndexed(IntLongConsumer action)
      A Indexed forEach implementation that allows you to keep track of how many elements were already iterated over.
      Parameter:
      action - The action to be performed for each element
      Löst aus:
      NullPointerException - if the specified action is null
    • forEach

      default <E> void forEach(E input, ObjectLongConsumer<E> action)
      Helper function to reduce Lambda usage and allow for more method references, since these are faster/cleaner.
      Typparameter:
      E - the generic type of the Object
      Parameter:
      input - the object that should be included
      action - The action to be performed for each element
      Löst aus:
      NullPointerException - if the specified action is null
    • spliterator

      default LongSplititerator spliterator()
      A Type Specific Type Splititerator to reduce boxing/unboxing
      Angegeben von:
      spliterator in Schnittstelle Iterable<Long>
      Gibt zurück:
      type specific splititerator
    • asAsync

      default LongAsyncBuilder asAsync()
      Creates a Async Builder for moving work of the thread. It is not designed to split the work to multithreaded work, so using this keep it singlethreaded, but it allows to be moved to another thread.
      Gibt zurück:
      a AsyncBuilder
      Siehe auch:
    • map

      default <E> ObjectIterable<E> map(LongFunction<E> mapper)
      A Helper function to reduce the usage of Streams and allows to convert a Iterable to something else.
      Typparameter:
      E - The return type.
      Parameter:
      mapper - the mapping function
      Gibt zurück:
      a new Iterable that returns the desired result
    • flatMap

      default <E, V extends Iterable<E>> ObjectIterable<E> flatMap(LongFunction<V> mapper)
      A Helper function to reduce the usage of Streams and allows to convert a Iterable to something else.
      Typparameter:
      E - The return type.
      V - The return type supplier.
      Parameter:
      mapper - the flatMapping function
      Gibt zurück:
      a new Iterable that returns the desired result
      Note:
      does not support toLongArray optimizations.
    • arrayflatMap

      default <E> ObjectIterable<E> arrayflatMap(LongFunction<E[]> mapper)
      A Helper function to reduce the usage of Streams and allows to convert a Iterable to something else.
      Typparameter:
      E - The return type.
      Parameter:
      mapper - the flatMapping function
      Gibt zurück:
      a new Iterable that returns the desired result
      Note:
      does not support toLongArray optimizations.
    • filter

      default LongIterable filter(LongPredicate filter)
      A Helper function to reduce the usage of Streams and allows to filter out unwanted elements
      Parameter:
      filter - the elements that should be kept.
      Gibt zurück:
      a Iterable that filtered out all unwanted elements
      Note:
      does not support toLongArray optimizations.
    • distinct

      default LongIterable distinct()
      A Helper function to reduce the usage of Streams and allows to filter out duplicated elements
      Gibt zurück:
      a Iterable that filtered out all duplicated elements
      Note:
      does not support toLongArray optimizations.
    • repeat

      default LongIterable repeat(int repeats)
      A Helper function to reduce the usage of Streams and allows to repeat elements a desired amount of times
      Parameter:
      repeats - how many times the elements should be repeated
      Gibt zurück:
      a Iterable that is repeating multiple times
    • limit

      default LongIterable limit(long limit)
      A Helper function to reduce the usage of Streams and allows to limit the amount of elements
      Parameter:
      limit - the amount of elements it should be limited to
      Gibt zurück:
      a Iterable that is limited in length
    • sorted

      default LongIterable sorted(LongComparator sorter)
      A Helper function to reduce the usage of Streams and allows to sort the elements
      Parameter:
      sorter - that sorts the elements.
      Gibt zurück:
      a Iterable that is sorted
    • peek

      default LongIterable peek(LongConsumer action)
      A Helper function to reduce the usage of Streams and allows to preview elements before they are iterated through
      Parameter:
      action - the action that should be applied
      Gibt zurück:
      a Peeked Iterable
    • pour

      default <E extends LongCollection> E pour(E collection)
      A Helper function to reduce the usage of Streams and allows to collect all elements
      Typparameter:
      E - the collection type
      Parameter:
      collection - that the elements should be inserted to
      Gibt zurück:
      the input with the desired elements
    • pourAsList

      default LongList pourAsList()
      A Helper function that reduces the usage of streams and allows to collect all elements as a ArrayList
      Gibt zurück:
      a new ArrayList of all elements
    • pourAsSet

      default LongSet pourAsSet()
      A Helper function that reduces the usage of streams and allows to collect all elements as a LinkedHashSet
      Gibt zurück:
      a new LinkedHashSet of all elements
    • toLongArray

      default long[] toLongArray()
      A Helper function that reduces the usage of streams and allows to collect all elements as a Array
      Gibt zurück:
      a new Array of all elements
    • matchesAny

      default boolean matchesAny(LongPredicate filter)
      Helper function to reduce stream usage that allows to filter for any matches.
      Parameter:
      filter - that should be applied
      Gibt zurück:
      true if any matches were found
    • matchesNone

      default boolean matchesNone(LongPredicate filter)
      Helper function to reduce stream usage that allows to filter for no matches.
      Parameter:
      filter - that should be applied
      Gibt zurück:
      true if no matches were found
    • matchesAll

      default boolean matchesAll(LongPredicate filter)
      Helper function to reduce stream usage that allows to filter for all matches.
      Parameter:
      filter - that should be applied
      Gibt zurück:
      true if all matches.
    • findFirst

      default long findFirst(LongPredicate filter)
      Helper function to reduce stream usage that allows to filter for the first match.
      Parameter:
      filter - that should be applied
      Gibt zurück:
      the found value or the null equivalent variant.
    • reduce

      default long reduce(long identity, LongLongUnaryOperator operator)
      Performs a reduction on the elements of this Iterable
      Parameter:
      identity - the start value
      operator - the operation that should be applied
      Gibt zurück:
      the reduction result, returns identity if nothing was found
    • reduce

      default long reduce(LongLongUnaryOperator operator)
      Performs a reduction on the elements of this Iterable
      Parameter:
      operator - the operation that should be applied
      Gibt zurück:
      the reduction result, returns null value if nothing was found
    • count

      default int count(LongPredicate filter)
      Helper function to reduce stream usage that allows to count the valid elements.
      Parameter:
      filter - that should be applied
      Gibt zurück:
      the amount of Valid Elements