Package org.opentrafficsim.road.od
Class Category
java.lang.Object
org.opentrafficsim.road.od.Category
- All Implemented Interfaces:
Serializable
A category is a set of objects who's class belongs to a certain categorization. One
Category
object can specify to
which subset of traffic between on origin and destination certain demand data belongs.
Copyright (c) 2013-2024 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved.
BSD-style license. See OpenTrafficSim License.
- Author:
- Alexander Verbraeck, Peter Knoppers, Wouter Schakel
- See Also:
-
Field Summary
-
Constructor Summary
-
Method Summary
-
Field Details
-
UNCATEGORIZED
Empty category.
-
-
Constructor Details
-
Category
- Parameters:
categorization
- Categorization; categorizationobject1
- Object; 1st objectobjects
- Object...; other objects- Throws:
IllegalArgumentException
- if the objects do not comply with the categorizationNullPointerException
- if any input is null
-
-
Method Details
-
get
Returns the i'th object.- Parameters:
i
- int; index of the object- Returns:
- the i'th object
- Throws:
IndexOutOfBoundsException
- if index i is out of bounds
-
getCategorization
- Returns:
- categorization.
-
get
Returns the object of this category pertaining to the specified class from the category.- Type Parameters:
T
- type of the object- Parameters:
clazz
- Class<T>; class from categorization to get the category object for- Returns:
- Object; object of this category pertaining to the specified class from the category
-
hashCode
public final int hashCode() -
equals
-
toString
-