Package xyz.cofe.iter

Class MapIterable<FromType,​ToType>

java.lang.Object
xyz.cofe.iter.MapIterable<FromType,​ToType>
Type Parameters:
FromType - Исходный тип
ToType - Целевой тип
All Implemented Interfaces:
java.lang.Iterable<ToType>, Eterable<ToType>

public class MapIterable<FromType,​ToType>
extends java.lang.Object
implements Eterable<ToType>
Итератор отобрадения одного типа данных на другой
  • Constructor Details

    • MapIterable

      public MapIterable​(java.lang.Iterable<FromType> src, java.util.function.Function<FromType,​ToType> convertor)
      Конструктор
      Parameters:
      src - исходные данные
      convertor - функция конвертировния
  • Method Details

    • iterator

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