Package io.beanmapper.annotations
Enum Class BeanCollectionUsage
- All Implemented Interfaces:
Serializable
,Comparable<BeanCollectionUsage>
,Constable
Determines how to deal with the target collection. If the value is set to CONSTRUCT, it
will also be recreated, even if it already exists. If REUSE is set, it will attempt to
reuse the collection if it exists, or else CONSTRUCT it. If CLEAR is set, it will
call clear() on the collection, unless it does not exist (call CONSTRUCT).
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
boolean
mustConstruct
(Object targetCollection) static BeanCollectionUsage
Returns the enum constant of this class with the specified name.static BeanCollectionUsage[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
CONSTRUCT
Always reconstruct the target collection -
REUSE
Reuse the target collection if it exists; construct if not. -
CLEAR
Call clear on the target collection if it exists; construct if not. DEFAULT option
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum class has no constant with the specified nameNullPointerException
- if the argument is null
-
mustClear
public boolean mustClear() -
mustConstruct
-