Package org.hawaiiframework.converter
Class DefaultNullListConversionStrategies
java.lang.Object
org.hawaiiframework.converter.DefaultNullListConversionStrategies
A few default implementations for the
NullListConversionStrategy
.-
Method Summary
Modifier and TypeMethodDescriptionstatic <T> NullListConversionStrategy<T>
raiseError
(Class<T> ignored) Raise anIllegalArgumentException
that the list is null.static <T> NullListConversionStrategy<T>
returnEmptyList
(Class<T> ignored) Return an empty list.static <T> NullListConversionStrategy<T>
returnNull
(Class<T> ignored) Return null.
-
Method Details
-
raiseError
Raise anIllegalArgumentException
that the list is null.- Type Parameters:
T
- The element type of the list to be returned.- Parameters:
ignored
- The class, ignored, used for type casting.- Throws:
IllegalArgumentException
- always
-
returnNull
Return null.- Type Parameters:
T
- The element type of the list to be returned.- Parameters:
ignored
- The class, ignored, used for type casting.- Returns:
null
, always.
-
returnEmptyList
Return an empty list.- Type Parameters:
T
- The element type of the list to be returned.- Parameters:
ignored
- The class, ignored, used for type casting.- Returns:
- An empty list.
-