public class CollectionAdder
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
int |
defaultFlattenDepth |
boolean |
flattenIfSizeOne |
boolean |
flattenToNullIfEmpty |
boolean |
mayFlatten |
boolean |
mustFlatten |
boolean |
nullOk |
boolean |
onlyAddOne |
java.lang.Class<?> |
unflattenedCollectionType |
Constructor and Description |
---|
CollectionAdder() |
CollectionAdder(boolean mustFlatten,
boolean mayFlatten,
boolean flattenIfSizeOne,
boolean flattenToNullIfEmpty,
int defaultFlattenDepth,
boolean nullOk,
boolean onlyAddOne,
java.lang.Class<?> unflattenedCollectionType) |
Modifier and Type | Method and Description |
---|---|
boolean |
add(java.lang.Object o,
java.util.Collection<java.lang.Object> list) |
boolean |
add(java.lang.Object o,
java.util.Collection<java.lang.Object> list,
int flattenDepth) |
java.lang.Object |
fix(java.util.Collection<?> coll)
Fix an existing Collection according to the ListBuilder's properties.
|
java.lang.Object |
fix(java.util.Collection<?> coll,
int flattenDepth)
Fix an existing collection according to the ListBuilder's properties.
|
public boolean mustFlatten
public boolean mayFlatten
public boolean flattenIfSizeOne
public boolean flattenToNullIfEmpty
public int defaultFlattenDepth
public boolean nullOk
public boolean onlyAddOne
public java.lang.Class<?> unflattenedCollectionType
public CollectionAdder(boolean mustFlatten, boolean mayFlatten, boolean flattenIfSizeOne, boolean flattenToNullIfEmpty, int defaultFlattenDepth, boolean nullOk, boolean onlyAddOne, java.lang.Class<?> unflattenedCollectionType)
mustFlatten
- mayFlatten
- flattenIfSizeOne
- flattenToNullIfEmpty
- defaultFlattenDepth
- nullOk
- public CollectionAdder()
public boolean add(java.lang.Object o, java.util.Collection<java.lang.Object> list)
public java.lang.Object fix(java.util.Collection<?> coll)
coll
- the input Collectionpublic java.lang.Object fix(java.util.Collection<?> coll, int flattenDepth)
coll
- flattenDepth
- public boolean add(java.lang.Object o, java.util.Collection<java.lang.Object> list, int flattenDepth)