public class Category extends Object implements Serializable
Category
object can specify to
which subset of traffic between on origin and destination certain demand data belongs.
Copyright (c) 2013-2019 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 Category |
UNCATEGORIZED
Empty category.
|
Constructor and Description |
---|
Category(Categorization categorization,
Object object1,
Object... objects) |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object obj) |
<T> T |
get(Class<T> clazz)
Returns the object of this category pertaining to the specified class from the category.
|
Object |
get(int i)
Returns the i'th object.
|
Categorization |
getCategorization() |
int |
hashCode() |
String |
toString() |
public static final Category UNCATEGORIZED
public Category(Categorization categorization, Object object1, Object... objects)
categorization
- Categorization; categorizationobject1
- Object; 1st objectobjects
- Object...; other objectsIllegalArgumentException
- if the objects do not comply with the categorizationNullPointerException
- if any input is nullpublic final Object get(int i)
i
- int; index of the objectIndexOutOfBoundsException
- if index i is out of boundspublic final Categorization getCategorization()
public final <T> T get(Class<T> clazz)
T
- type of the objectclazz
- Class<T>; class from categorization to get the category object forCopyright © 2014–2019 Delft University of Technology. All rights reserved.