Another ExceptionSet method

This commit is contained in:
Olof Larsson 2016-01-12 14:58:48 +01:00
parent ae906f18aa
commit 18bc7dc9db

View File

@ -11,6 +11,7 @@ public class ExceptionSet<T>
// -------------------------------------------- // // -------------------------------------------- //
public boolean standard = true; public boolean standard = true;
public boolean isStandard() { return this.standard; }
public MassiveTreeSet<String, CaseInsensitiveComparator> exceptions = new MassiveTreeSet<String, CaseInsensitiveComparator>(CaseInsensitiveComparator.get()); public MassiveTreeSet<String, CaseInsensitiveComparator> exceptions = new MassiveTreeSet<String, CaseInsensitiveComparator>(CaseInsensitiveComparator.get());
@ -38,11 +39,16 @@ public class ExceptionSet<T>
// CONTAINS // CONTAINS
// -------------------------------------------- // // -------------------------------------------- //
public boolean contains(String item) public boolean containsString(String item)
{ {
if (this.exceptions.contains(item)) return ! this.standard; if (this.exceptions.contains(item)) return ! this.standard;
return this.standard; return this.standard;
} }
public boolean contains(String item)
{
return this.containsString(item);
}
public boolean contains(T item) public boolean contains(T item)
{ {