Package xyz.cofe.iter

Class FilterIterable<T>

java.lang.Object
xyz.cofe.iter.FilterIterable<T>
Type Parameters:
T - тип элементов
All Implemented Interfaces:
java.lang.Iterable<T>, Eterable<T>

public class FilterIterable<T>
extends java.lang.Object
implements Eterable<T>
Итератор - фильтр
  • Field Summary

    Fields 
    Modifier and Type Field Description
    protected java.lang.Iterable<T> iterable
    Итератор
    protected java.util.function.Predicate<T> predicate
    Предикат
  • Constructor Summary

    Constructors 
    Constructor Description
    FilterIterable​(java.util.function.Predicate<T> predicate, java.lang.Iterable<T> iterable)
    Конструктор
  • Method Summary

    Modifier and Type Method Description
    java.util.Iterator<T> iterator()
    Возвращает итератор

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface xyz.cofe.iter.Eterable

    count, filter, first, limit, map, notNull, product, product, product, product, product, reduce, toList, union, union

    Methods inherited from interface java.lang.Iterable

    forEach, spliterator
  • Field Details

    • predicate

      protected java.util.function.Predicate<T> predicate
      Предикат
    • iterable

      protected java.lang.Iterable<T> iterable
      Итератор
  • Constructor Details

    • FilterIterable

      public FilterIterable​(java.util.function.Predicate<T> predicate, java.lang.Iterable<T> iterable)
      Конструктор
      Parameters:
      predicate - Предикат
      iterable - Итератор
  • Method Details

    • iterator

      public java.util.Iterator<T> iterator()
      Возвращает итератор
      Specified by:
      iterator in interface java.lang.Iterable<T>
      Returns:
      итератор