Return lists in Coll

This commit is contained in:
Olof Larsson 2014-06-11 22:06:52 +02:00
parent 8e68cb77b9
commit 19d5682741
2 changed files with 10 additions and 9 deletions

View File

@ -5,6 +5,7 @@ import java.util.Collections;
import java.util.Comparator;
import java.util.HashSet;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.Map.Entry;
import java.util.Set;
@ -135,13 +136,12 @@ public class Coll<E> implements CollInterface<E>
@Override public Collection<E> getAll()
{
return Collections.unmodifiableCollection(this.entity2id.keySet());
}
@Override public Collection<E> getAll(Predictate<? super E> where) { return MStoreUtil.uglySQL(this.getAll(), where, null, null, null); }
@Override public Collection<E> getAll(Predictate<? super E> where, Comparator<? super E> orderby) { return MStoreUtil.uglySQL(this.getAll(), where, orderby, null, null); }
@Override public Collection<E> getAll(Predictate<? super E> where, Comparator<? super E> orderby, Integer limit) { return MStoreUtil.uglySQL(this.getAll(), where, orderby, limit, null); }
@Override public Collection<E> getAll(Predictate<? super E> where, Comparator<? super E> orderby, Integer limit, Integer offset) { return MStoreUtil.uglySQL(this.getAll(), where, orderby, limit, offset); }
@Override public List<E> getAll(Predictate<? super E> where) { return MStoreUtil.uglySQL(this.getAll(), where, null, null, null); }
@Override public List<E> getAll(Predictate<? super E> where, Comparator<? super E> orderby) { return MStoreUtil.uglySQL(this.getAll(), where, orderby, null, null); }
@Override public List<E> getAll(Predictate<? super E> where, Comparator<? super E> orderby, Integer limit) { return MStoreUtil.uglySQL(this.getAll(), where, orderby, limit, null); }
@Override public List<E> getAll(Predictate<? super E> where, Comparator<? super E> orderby, Integer limit, Integer offset) { return MStoreUtil.uglySQL(this.getAll(), where, orderby, limit, offset); }
@Override
public String fixId(Object oid)

View File

@ -2,6 +2,7 @@ package com.massivecraft.massivecore.store;
import java.util.Collection;
import java.util.Comparator;
import java.util.List;
import java.util.Map;
import org.bukkit.plugin.Plugin;
@ -42,10 +43,10 @@ public interface CollInterface<E>
public String getId(Object entity);
public boolean containsEntity(Object entity);
public Collection<E> getAll();
public Collection<E> getAll(Predictate<? super E> where);
public Collection<E> getAll(Predictate<? super E> where, Comparator<? super E> orderby);
public Collection<E> getAll(Predictate<? super E> where, Comparator<? super E> orderby, Integer limit);
public Collection<E> getAll(Predictate<? super E> where, Comparator<? super E> orderby, Integer limit, Integer offset);
public List<E> getAll(Predictate<? super E> where);
public List<E> getAll(Predictate<? super E> where, Comparator<? super E> orderby);
public List<E> getAll(Predictate<? super E> where, Comparator<? super E> orderby, Integer limit);
public List<E> getAll(Predictate<? super E> where, Comparator<? super E> orderby, Integer limit, Integer offset);
public String fixId(Object oid);