No default sorting.
This commit is contained in:
parent
87be4f0914
commit
602ac30f8c
@ -812,7 +812,7 @@ public class Coll<E> extends CollAbstract<E>
|
||||
// -------------------------------------------- //
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
public Coll(String name, Class<E> entityClass, Db db, Plugin plugin, boolean creative, boolean lowercasing)
|
||||
public Coll(String name, Class<E> entityClass, Db db, Plugin plugin, boolean creative, boolean lowercasing, boolean sorted)
|
||||
{
|
||||
// Setup the name and the parsed parts
|
||||
this.name = name;
|
||||
@ -838,8 +838,8 @@ public class Coll<E> extends CollAbstract<E>
|
||||
this.collDriverObject = db.createCollDriverObject(this);
|
||||
|
||||
// STORAGE
|
||||
this.id2entity = new ConcurrentSkipListMap<String, E>(NaturalOrderComparator.get());
|
||||
this.entity2id = Entity.class.isAssignableFrom(entityClass) ? new ConcurrentSkipListMap<E, String>((Comparator<? super E>) ComparatorEntityId.get()) : new ConcurrentHashMap<E, String>();
|
||||
this.id2entity = (sorted) ? new ConcurrentSkipListMap<String, E>(NaturalOrderComparator.get()) : new ConcurrentHashMap<String, E>();
|
||||
this.entity2id = (Entity.class.isAssignableFrom(entityClass) && sorted) ? new ConcurrentSkipListMap<E, String>((Comparator<? super E>) ComparatorEntityId.get()) : new ConcurrentHashMap<E, String>();
|
||||
|
||||
// IDENTIFIED MODIFICATIONS
|
||||
this.identifiedModifications = new ConcurrentHashMap<String, Modification>();
|
||||
@ -857,7 +857,7 @@ public class Coll<E> extends CollAbstract<E>
|
||||
|
||||
public Coll(String name, Class<E> entityClass, Db db, Plugin plugin)
|
||||
{
|
||||
this(name, entityClass, db, plugin, false, false);
|
||||
this(name, entityClass, db, plugin, false, false, false);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -21,14 +21,14 @@ public class SenderColl<E extends SenderEntity<E>> extends Coll<E> implements Se
|
||||
// CONSTRUCT
|
||||
// -------------------------------------------- //
|
||||
|
||||
public SenderColl(String name, Class<E> entityClass, Db db, Plugin plugin, boolean creative, boolean lowercasing)
|
||||
public SenderColl(String name, Class<E> entityClass, Db db, Plugin plugin, boolean creative, boolean lowercasing, boolean sorted)
|
||||
{
|
||||
super(name, entityClass, db, plugin, creative, lowercasing);
|
||||
super(name, entityClass, db, plugin, creative, lowercasing, sorted);
|
||||
}
|
||||
|
||||
public SenderColl(String name, Class<E> entityClass, Db db, Plugin plugin)
|
||||
{
|
||||
super(name, entityClass, db, plugin, true, true);
|
||||
super(name, entityClass, db, plugin, true, true, false);
|
||||
}
|
||||
|
||||
// -------------------------------------------- //
|
||||
|
Loading…
Reference in New Issue
Block a user