Class ObjectUtility.ClassMap
- java.lang.Object
-
- org.glassfish.pfl.basic.algorithm.ObjectUtility.ClassMap
-
- Enclosing class:
- ObjectUtility
private static class ObjectUtility.ClassMap extends java.lang.Object
-
-
Field Summary
Fields Modifier and Type Field Description (package private) java.util.List<Pair<java.lang.Class<?>,ObjectUtility.ObjectPrinter>>
data
-
Constructor Summary
Constructors Constructor Description ClassMap()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ObjectUtility.ObjectPrinter
get(java.lang.Class cls)
Return the first element of the ClassMap that is assignable to cls.void
put(java.lang.Class cls, ObjectUtility.ObjectPrinter obj)
Add obj to the map with key cls.
-
-
-
Field Detail
-
data
java.util.List<Pair<java.lang.Class<?>,ObjectUtility.ObjectPrinter>> data
-
-
Method Detail
-
get
public ObjectUtility.ObjectPrinter get(java.lang.Class cls)
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
public void put(java.lang.Class cls, ObjectUtility.ObjectPrinter obj)
Add obj to the map with key cls. Note that order matters, as the first match is returned.
-
-