public class Categorization extends Object implements Serializable, org.opentrafficsim.base.Identifiable
 Copyright (c) 2013-2018 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved. 
 BSD-style license. See OpenTrafficSim License.
 
| Modifier and Type | Field and Description | 
|---|---|
static Categorization | 
UNCATEGORIZED
Empty categorization. 
 | 
| Constructor and Description | 
|---|
Categorization(String id,
              Class<?> class1,
              Class<?>... classes)  | 
| Modifier and Type | Method and Description | 
|---|---|
boolean | 
entails(Class<?> clazz)
Returns whether the categorization contains a class that is, or is a sub type of, the given class. 
 | 
boolean | 
equals(Object obj) | 
Class<?> | 
get(int i)
Returns the i'th class. 
 | 
String | 
getId()  | 
int | 
hashCode() | 
int | 
size()
Returns the number of category classes defined. 
 | 
String | 
toString() | 
public static final Categorization UNCATEGORIZED
public Categorization(String id, Class<?> class1, Class<?>... classes)
id - Idclass1 - 1st classclasses - other classesIllegalArgumentException - if any class is given multiple timesNullPointerException - if any input is nullpublic final int size()
public final Class<?> get(int i)
i - index of the classIndexOutOfBoundsException - if index i is out of boundspublic final String getId()
getId in interface org.opentrafficsim.base.Identifiablepublic final boolean entails(Class<?> clazz)
clazz - Class; class to checkCopyright © 2014–2018 Delft University of Technology. All rights reserved.