Package xyz.cofe.iter

Class SingleIterable<T>

java.lang.Object
xyz.cofe.iter.SingleIterable<T>
All Implemented Interfaces:
java.lang.Iterable<T>, Eterable<T>

public class SingleIterable<T>
extends java.lang.Object
implements Eterable<T>
Возвращает последовательность с одним элементом
Author:
gocha
  • Constructor Summary

    Constructors 
    Constructor Description
    SingleIterable​(java.util.function.Supplier<T> item)
    Конструктор
    SingleIterable​(T item)
    Конструктор
  • 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
  • Constructor Details

    • SingleIterable

      public SingleIterable​(T item)
      Конструктор
      Parameters:
      item - элемент
    • SingleIterable

      public SingleIterable​(java.util.function.Supplier<T> item)
      Конструктор
      Parameters:
      item - элемент
  • Method Details

    • iterator

      public java.util.Iterator<T> iterator()
      Specified by:
      iterator in interface java.lang.Iterable<T>