Class TransformRowMapper<I,O>

java.lang.Object
org.simpleflatmapper.poi.impl.TransformRowMapper<I,O>
All Implemented Interfaces:
org.simpleflatmapper.map.ContextualSourceMapper<org.apache.poi.ss.usermodel.Row,O>, org.simpleflatmapper.map.EnumerableMapper<org.apache.poi.ss.usermodel.Sheet,O,RuntimeException>, org.simpleflatmapper.map.SetRowMapper<org.apache.poi.ss.usermodel.Row,org.apache.poi.ss.usermodel.Sheet,O,RuntimeException>, org.simpleflatmapper.map.SourceMapper<org.apache.poi.ss.usermodel.Row,O>, RowMapper<O>, SheetMapper<O>

public class TransformRowMapper<I,O> extends Object implements RowMapper<O>
  • Constructor Summary

    Constructors
    Constructor
    Description
    TransformRowMapper(RowMapper<I> delegate, org.simpleflatmapper.util.Function<I,O> transform)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    org.simpleflatmapper.util.Enumerable<O>
    enumerate(int startRow, org.apache.poi.ss.usermodel.Sheet sheet)
     
    org.simpleflatmapper.util.Enumerable<O>
    enumerate(org.apache.poi.ss.usermodel.Sheet sheet)
     
    <RH extends org.simpleflatmapper.util.CheckedConsumer<? super O>>
    RH
    forEach(int startRow, org.apache.poi.ss.usermodel.Sheet sheet, RH consumer)
     
    <RH extends org.simpleflatmapper.util.CheckedConsumer<? super O>>
    RH
    forEach(org.apache.poi.ss.usermodel.Sheet sheet, RH consumer)
     
    iterator(int startRow, org.apache.poi.ss.usermodel.Sheet sheet)
     
    iterator(org.apache.poi.ss.usermodel.Sheet sheet)
     
    map(org.apache.poi.ss.usermodel.Row source)
     
    map(org.apache.poi.ss.usermodel.Row source, org.simpleflatmapper.map.MappingContext<? super org.apache.poi.ss.usermodel.Row> context)
     
    stream(int startRow, org.apache.poi.ss.usermodel.Sheet sheet)
     
    stream(org.apache.poi.ss.usermodel.Sheet sheet)
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • TransformRowMapper

      public TransformRowMapper(RowMapper<I> delegate, org.simpleflatmapper.util.Function<I,O> transform)
  • Method Details

    • map

      public O map(org.apache.poi.ss.usermodel.Row source) throws org.simpleflatmapper.map.MappingException
      Specified by:
      map in interface org.simpleflatmapper.map.ContextualSourceMapper<I,O>
      Throws:
      org.simpleflatmapper.map.MappingException
    • map

      public O map(org.apache.poi.ss.usermodel.Row source, org.simpleflatmapper.map.MappingContext<? super org.apache.poi.ss.usermodel.Row> context) throws org.simpleflatmapper.map.MappingException
      Specified by:
      map in interface org.simpleflatmapper.map.SourceMapper<I,O>
      Throws:
      org.simpleflatmapper.map.MappingException
    • iterator

      public Iterator<O> iterator(org.apache.poi.ss.usermodel.Sheet sheet)
      Specified by:
      iterator in interface org.simpleflatmapper.map.EnumerableMapper<org.apache.poi.ss.usermodel.Sheet,O,RuntimeException>
      Specified by:
      iterator in interface SheetMapper<I>
      Parameters:
      sheet - the sheet to map from
      Returns:
      an iterator of mapped newInstance of T
    • iterator

      public Iterator<O> iterator(int startRow, org.apache.poi.ss.usermodel.Sheet sheet)
      Specified by:
      iterator in interface SheetMapper<I>
      Parameters:
      startRow - row index to start at
      sheet - the sheet to map from
      Returns:
      an iterator of mapped newInstance of T
    • enumerate

      public org.simpleflatmapper.util.Enumerable<O> enumerate(org.apache.poi.ss.usermodel.Sheet sheet)
      Specified by:
      enumerate in interface org.simpleflatmapper.map.EnumerableMapper<org.apache.poi.ss.usermodel.Sheet,O,RuntimeException>
      Specified by:
      enumerate in interface SheetMapper<I>
      Parameters:
      sheet - the sheet to map from
      Returns:
      an iterator of mapped newInstance of T
    • enumerate

      public org.simpleflatmapper.util.Enumerable<O> enumerate(int startRow, org.apache.poi.ss.usermodel.Sheet sheet)
      Specified by:
      enumerate in interface SheetMapper<I>
      Parameters:
      startRow - row index to start at
      sheet - the sheet to map from
      Returns:
      an iterator of mapped newInstance of T
    • forEach

      public <RH extends org.simpleflatmapper.util.CheckedConsumer<? super O>> RH forEach(org.apache.poi.ss.usermodel.Sheet sheet, RH consumer)
      Specified by:
      forEach in interface org.simpleflatmapper.map.EnumerableMapper<org.apache.poi.ss.usermodel.Sheet,O,RuntimeException>
      Specified by:
      forEach in interface SheetMapper<I>
      Type Parameters:
      RH - the type of the handler
      Parameters:
      sheet - the sheet to map from
      consumer - the handler to call back
      Returns:
      the handler
    • forEach

      public <RH extends org.simpleflatmapper.util.CheckedConsumer<? super O>> RH forEach(int startRow, org.apache.poi.ss.usermodel.Sheet sheet, RH consumer)
      Specified by:
      forEach in interface SheetMapper<I>
      Type Parameters:
      RH - the type of the handler
      Parameters:
      startRow - row index to start at
      sheet - the sheet to map from
      consumer - the handler to call back
      Returns:
      the handler
    • stream

      public Stream<O> stream(org.apache.poi.ss.usermodel.Sheet sheet)
      Specified by:
      stream in interface org.simpleflatmapper.map.EnumerableMapper<org.apache.poi.ss.usermodel.Sheet,O,RuntimeException>
      Specified by:
      stream in interface SheetMapper<I>
      Parameters:
      sheet - the sheet to map from
      Returns:
      a stream on mapped newInstance of T
    • stream

      public Stream<O> stream(int startRow, org.apache.poi.ss.usermodel.Sheet sheet)
      Specified by:
      stream in interface SheetMapper<I>
      Parameters:
      startRow - row index to start at
      sheet - the sheet to map from
      Returns:
      a stream on mapped newInstance of T