All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.sfm.utils.ListHandler Maven / Gradle / Ivy

Go to download

Java library to map flat record - ResultSet, csv - to java object with minimum configuration and low footprint.

There is a newer version: 1.10.3
Show newest version
package org.sfm.utils;

import java.util.ArrayList;
import java.util.List;

/**
 * Implementation of {@link org.sfm.utils.RowHandler} that collect all the value into a list.

* Equivalent to a {@link java.util.stream.Collectors#toList()}. * @param the type of the callback argument */ public final class ListHandler implements RowHandler { private final List list = new ArrayList(); @Override public void handle(final T t) { list.add(t); } /** * * @return the collected objects */ public List getList() { return list; } }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy