org.xblackcat.sjpu.storage.consumer.ToSetConsumer Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of sjpu-dbah Show documentation
Show all versions of sjpu-dbah Show documentation
Service for generating DB access logic in simple way via interfaces and annotations
package org.xblackcat.sjpu.storage.consumer;
import java.util.HashSet;
import java.util.Set;
/**
* Consume all objects into {@linkplain java.util.Set Set}. {@linkplain java.util.HashSet HashSet} is used as default container
*
* @author xBlackCat
*/
public class ToSetConsumer implements IRowSetConsumer, T> {
private final Set set = new HashSet<>();
@Override
public boolean consume(T o) {
set.add(o);
return false;
}
public Set getRowsHolder() {
return set;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy