public static final class Enums.FromName<E extends Enum<E>> extends Object implements Fn<String,E>
Fn
which resolves enum constants from names (String
).
Use or(Enum)
to yield a fallback value for non-existing constants,
instead of throwing an exception.Modifier and Type | Method and Description |
---|---|
E |
$(String name)
Applies the function.
|
Fn<String,E> |
or(E fallback) |
Copyright © 2016. All Rights Reserved.