Repair ExceptionSet Editor

This commit is contained in:
Olof Larsson 2016-05-12 15:30:11 +02:00
parent 37d4932414
commit a2a1cf269f
No known key found for this signature in database
GPG Key ID: BBEF14F97DA52474
2 changed files with 33 additions and 0 deletions

View File

@ -3,6 +3,8 @@ package com.massivecraft.massivecore.collections;
import java.util.Arrays; import java.util.Arrays;
import java.util.Collection; import java.util.Collection;
import com.massivecraft.massivecore.command.editor.annotation.EditorType;
import com.massivecraft.massivecore.command.type.container.TypeMassiveTreeSetInsensitive;
import com.massivecraft.massivecore.comparator.ComparatorCaseInsensitive; import com.massivecraft.massivecore.comparator.ComparatorCaseInsensitive;
public class ExceptionSet public class ExceptionSet
@ -15,6 +17,7 @@ public class ExceptionSet
public boolean isStandard() { return this.standard; } public boolean isStandard() { return this.standard; }
public void setStandard(boolean standard) { this.standard = standard; } public void setStandard(boolean standard) { this.standard = standard; }
@EditorType(TypeMassiveTreeSetInsensitive.class)
public MassiveTreeSet<String, ComparatorCaseInsensitive> exceptions = new MassiveTreeSet<>(ComparatorCaseInsensitive.get()); public MassiveTreeSet<String, ComparatorCaseInsensitive> exceptions = new MassiveTreeSet<>(ComparatorCaseInsensitive.get());
// -------------------------------------------- // // -------------------------------------------- //

View File

@ -0,0 +1,30 @@
package com.massivecraft.massivecore.command.type.container;
import com.massivecraft.massivecore.collections.MassiveTreeSet;
import com.massivecraft.massivecore.command.type.primitive.TypeString;
import com.massivecraft.massivecore.comparator.ComparatorCaseInsensitive;
public class TypeMassiveTreeSetInsensitive extends TypeContainer<MassiveTreeSet<String, ComparatorCaseInsensitive>, String>
{
// -------------------------------------------- //
// INSTANCE & CONSTRUCT
// -------------------------------------------- //
private static final TypeMassiveTreeSetInsensitive i = new TypeMassiveTreeSetInsensitive();
public static TypeMassiveTreeSetInsensitive get() { return i; }
public TypeMassiveTreeSetInsensitive()
{
super(MassiveTreeSet.class, TypeString.get());
}
// -------------------------------------------- //
// OVERRIDE
// -------------------------------------------- //
@Override
public MassiveTreeSet<String, ComparatorCaseInsensitive> createNewInstance()
{
return new MassiveTreeSet<>(ComparatorCaseInsensitive.get());
}
}