Package com.gengoai.function
Class Switch<T>
- java.lang.Object
-
- com.gengoai.function.Switch<T>
-
- Type Parameters:
T
- the type parameter
- All Implemented Interfaces:
SerializableFunction<Object,T>
,Serializable
,Function<Object,T>
public final class Switch<T> extends Object implements SerializableFunction<Object,T>
The type Switch.- Author:
- David B. Bracewell
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
Switch.SwitchBuilder<V>
The type Switch builder.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static <V> Switch<V>
$switch(@NonNull Consumer<Switch.SwitchBuilder<V>> consumer)
Switch switch.T
apply(Object o)
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.gengoai.function.SerializableFunction
andThen, asConsumer, compose
-
-
-
-
Method Detail
-
$switch
public static <V> Switch<V> $switch(@NonNull @NonNull Consumer<Switch.SwitchBuilder<V>> consumer)
Switch switch.- Type Parameters:
V
- the type parameter- Parameters:
consumer
- the consumer- Returns:
- the switch
-
-