Class Switch
java.lang.Object
org.antublue.test.engine.internal.util.Switch
Class to implement switch functionally based on an Object's class
-
Method Summary
Modifier and TypeMethodDescriptionstatic <T> Consumer<T>switchCase(Class<T> clazz, Consumer<T> consumer) Method to implement a switch "case" based on an Object's classstatic voidswitchType(Object object, Consumer... consumers) Method to implement a "switch" based on an Object's class
-
Method Details
-
switchType
Method to implement a "switch" based on an Object's class- Parameters:
object- objectconsumers- consumers
-
switchCase
Method to implement a switch "case" based on an Object's class- Type Parameters:
T- the return type- Parameters:
clazz- clazzconsumer- consumer- Returns:
- the return value
-