Class ObjectUtility.ClassMap
java.lang.Object
org.glassfish.pfl.basic.algorithm.ObjectUtility.ClassMap
- Enclosing class:
ObjectUtility
-
Field Summary
FieldsModifier and TypeFieldDescription(package private) List
<Pair<Class<?>, ObjectUtility.ObjectPrinter>> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturn the first element of the ClassMap that is assignable to cls.void
put
(Class cls, ObjectUtility.ObjectPrinter obj) Add obj to the map with key cls.
-
Field Details
-
data
List<Pair<Class<?>,ObjectUtility.ObjectPrinter>> data
-
-
Constructor Details
-
ClassMap
public ClassMap()
-
-
Method Details
-
get
Return the first element of the ClassMap that is assignable to cls. The order is determined by the order in which the put method was called. Returns null if there is no match. -
put
Add obj to the map with key cls. Note that order matters, as the first match is returned.
-