Package com.c8db

Interface C8Iterable<T>

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      boolean allMatch​(Predicate<? super T> predicate)
      Returns whether all elements of this ArangoIterable match the provided predicate.
      boolean anyMatch​(Predicate<? super T> predicate)
      Returns whether any elements of this ArangoIterable match the provided predicate.
      <R extends Collection<? super T>>
      R
      collectInto​(R target)
      Iterates over all elements of this ArangoIterable and adds each to the given target.
      long count()
      Returns the count of elements of this ArangoIterable.
      C8Iterable<T> filter​(Predicate<? super T> predicate)
      Returns a ArangoIterable consisting of the elements of this ArangoIterable that match the given predicate.
      T first()
      Returns the first element or null if no element exists.
      void foreach​(Consumer<? super T> action)
      Performs the given action for each element of the ArangoIterable
      C8Iterator<T> iterator()  
      <R> C8Iterable<R> map​(Function<? super T,​? extends R> mapper)
      Returns a ArangoIterable consisting of the results of applying the given function to the elements of this ArangoIterable.
      boolean noneMatch​(Predicate<? super T> predicate)
      Returns whether no elements of this ArangoIterable match the provided predicate.
    • Method Detail

      • foreach

        void foreach​(Consumer<? super T> action)
        Performs the given action for each element of the ArangoIterable
        Parameters:
        action - a action to perform on the elements
      • map

        <R> C8Iterable<R> map​(Function<? super T,​? extends R> mapper)
        Returns a ArangoIterable consisting of the results of applying the given function to the elements of this ArangoIterable.
        Parameters:
        mapper - a function to apply to each element
        Returns:
        the new ArangoIterable
      • filter

        C8Iterable<T> filter​(Predicate<? super T> predicate)
        Returns a ArangoIterable consisting of the elements of this ArangoIterable that match the given predicate.
        Parameters:
        predicate - a predicate to apply to each element to determine if it should be included
        Returns:
        the new ArangoIterable
      • first

        T first()
        Returns the first element or null if no element exists.
        Returns:
        first element or null
      • count

        long count()
        Returns the count of elements of this ArangoIterable.
        Returns:
        the count of elements
      • anyMatch

        boolean anyMatch​(Predicate<? super T> predicate)
        Returns whether any elements of this ArangoIterable match the provided predicate.
        Parameters:
        predicate - a predicate to apply to elements of this ArangoIterable
        Returns:
        true if any elements of the ArangoIterable match the provided predicate, otherwise false
      • allMatch

        boolean allMatch​(Predicate<? super T> predicate)
        Returns whether all elements of this ArangoIterable match the provided predicate.
        Parameters:
        predicate - a predicate to apply to elements of this ArangoIterable
        Returns:
        true if all elements of the ArangoIterable match the provided predicate, otherwise false
      • noneMatch

        boolean noneMatch​(Predicate<? super T> predicate)
        Returns whether no elements of this ArangoIterable match the provided predicate.
        Parameters:
        predicate - a predicate to apply to elements of this ArangoIterable
        Returns:
        true if no elements of the ArangoIterable match the provided predicate, otherwise false
      • collectInto

        <R extends Collection<? super T>> R collectInto​(R target)
        Iterates over all elements of this ArangoIterable and adds each to the given target.
        Parameters:
        target - the collection to insert into
        Returns:
        the filled target