
de.comhix.twitch.database.objects.QueryResult Maven / Gradle / Ivy
package de.comhix.twitch.database.objects;
import com.google.common.collect.ForwardingList;
import java.util.List;
/**
* @author Benjamin Beeker
*/
public class QueryResult extends ForwardingList {
private final List objects;
private final long count;
public QueryResult(List objects) {
this(objects, objects.size());
}
public QueryResult(List objects, long count) {
this.objects = objects;
this.count = count;
}
/**
* The total number of matching objects found in the database for this query
*
* @return matching objects count
* @since 1.4.7
*/
public long getCount() {
return count;
}
@Override
protected List delegate() {
return objects;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy