Package com.illumon.iris.db.v2.routing
Class SafeCast
java.lang.Object
com.illumon.iris.db.v2.routing.SafeCast
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic List<?>
Cast the object to a List if possible, or throw a DataRoutingConfigurationExceptionCast the object to a Map if possible, or throw a DataRoutingConfigurationException
-
Constructor Details
-
SafeCast
public SafeCast()
-
-
Method Details
-
toMap
Cast the object to a Map if possible, or throw a DataRoutingConfigurationException- Parameters:
o
- the object to castcontext
- context for any exceptions (context is not a Map...)- Returns:
- o cast to a Map
-
toList
Cast the object to a List if possible, or throw a DataRoutingConfigurationException- Parameters:
o
- the object to castcontext
- context for any exceptions (context is not a List...)- Returns:
- o cast to a List
-