NaturalOrderComparator Null Compare. More Constructors for WorldExceptionSet.

This commit is contained in:
Olof Larsson 2015-04-22 11:21:05 +02:00
parent 2592772d8a
commit 469cf9ea24
2 changed files with 19 additions and 0 deletions

View File

@ -47,6 +47,11 @@ public class NaturalOrderComparator implements Comparator<Object>
@Override @Override
public int compare(Object o1, Object o2) public int compare(Object o1, Object o2)
{ {
// Null (MassiveCore Modification)
if (o1 == null && o2 == null) return 0;
if (o2 == null) return 1;
if (o1 == null) return -1;
String a = o1.toString(); String a = o1.toString();
String b = o2.toString(); String b = o2.toString();

View File

@ -15,6 +15,20 @@ public class WorldExceptionSet
public MassiveTreeSet<String, CaseInsensitiveComparator> exceptions = new MassiveTreeSet<String, CaseInsensitiveComparator>(CaseInsensitiveComparator.get()); public MassiveTreeSet<String, CaseInsensitiveComparator> exceptions = new MassiveTreeSet<String, CaseInsensitiveComparator>(CaseInsensitiveComparator.get());
// -------------------------------------------- //
// CONSTRUCT
// -------------------------------------------- //
public WorldExceptionSet()
{
}
public WorldExceptionSet(boolean standard)
{
this.standard = standard;
}
// -------------------------------------------- // // -------------------------------------------- //
// CONTAINS // CONTAINS
// -------------------------------------------- // // -------------------------------------------- //