Simplify Database Constructors. Use Setters.
This commit is contained in:
parent
4e6fdd9df4
commit
a24463842d
@ -979,7 +979,7 @@ public class Coll<E extends Entity<E>> extends CollAbstract<E>
|
|||||||
// CONSTRUCT
|
// CONSTRUCT
|
||||||
// -------------------------------------------- //
|
// -------------------------------------------- //
|
||||||
|
|
||||||
public Coll(String name, Class<E> entityClass, Db db, Plugin plugin, boolean creative, boolean lowercasing, boolean sorted)
|
public Coll(String name, Class<E> entityClass, Db db, Plugin plugin)
|
||||||
{
|
{
|
||||||
// Setup the name and the parsed parts
|
// Setup the name and the parsed parts
|
||||||
this.name = name;
|
this.name = name;
|
||||||
@ -995,9 +995,7 @@ public class Coll<E extends Entity<E>> extends CollAbstract<E>
|
|||||||
}
|
}
|
||||||
|
|
||||||
// WHAT DO WE HANDLE?
|
// WHAT DO WE HANDLE?
|
||||||
this.entityClass = entityClass;
|
this.entityClass = entityClass;
|
||||||
this.creative = creative;
|
|
||||||
this.lowercasing = lowercasing;
|
|
||||||
|
|
||||||
// SUPPORTING SYSTEM
|
// SUPPORTING SYSTEM
|
||||||
this.plugin = plugin;
|
this.plugin = plugin;
|
||||||
@ -1005,7 +1003,7 @@ public class Coll<E extends Entity<E>> extends CollAbstract<E>
|
|||||||
this.collDriverObject = db.createCollDriverObject(this);
|
this.collDriverObject = db.createCollDriverObject(this);
|
||||||
|
|
||||||
// STORAGE
|
// STORAGE
|
||||||
this.id2entity = (sorted) ? new ConcurrentSkipListMap<String, E>(NaturalOrderComparator.get()) : new ConcurrentHashMap<String, E>();
|
this.id2entity = new ConcurrentHashMap<String, E>();
|
||||||
|
|
||||||
// ENTITY DATA
|
// ENTITY DATA
|
||||||
this.identifiedModifications = new ConcurrentHashMap<String, Modification>();
|
this.identifiedModifications = new ConcurrentHashMap<String, Modification>();
|
||||||
@ -1016,11 +1014,6 @@ public class Coll<E extends Entity<E>> extends CollAbstract<E>
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
public Coll(String name, Class<E> entityClass, Db db, Plugin plugin)
|
|
||||||
{
|
|
||||||
this(name, entityClass, db, plugin, false, false, false);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void init()
|
public void init()
|
||||||
{
|
{
|
||||||
|
@ -21,14 +21,11 @@ public class SenderColl<E extends SenderEntity<E>> extends Coll<E> implements Se
|
|||||||
// CONSTRUCT
|
// CONSTRUCT
|
||||||
// -------------------------------------------- //
|
// -------------------------------------------- //
|
||||||
|
|
||||||
public SenderColl(String name, Class<E> entityClass, Db db, Plugin plugin, boolean creative, boolean lowercasing, boolean sorted)
|
|
||||||
{
|
|
||||||
super(name, entityClass, db, plugin, creative, lowercasing, sorted);
|
|
||||||
}
|
|
||||||
|
|
||||||
public SenderColl(String name, Class<E> entityClass, Db db, Plugin plugin)
|
public SenderColl(String name, Class<E> entityClass, Db db, Plugin plugin)
|
||||||
{
|
{
|
||||||
super(name, entityClass, db, plugin, true, true, false);
|
super(name, entityClass, db, plugin);
|
||||||
|
this.setCreative(true);
|
||||||
|
this.setLowercasing(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
// -------------------------------------------- //
|
// -------------------------------------------- //
|
||||||
|
Loading…
Reference in New Issue
Block a user