- java.lang.Object
-
- swim.structure.Form<Collection<T>>
-
- swim.structure.form.CollectionForm<T>
-
public final class CollectionForm<T> extends Form<Collection<T>>
-
-
Constructor Summary
Constructors Constructor Description CollectionForm(Class<?> type, Form<T> form)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Collection<T>cast(Item item)Converts a structurally typediteminto a nominally typed Java object.Collection<T>cast(Item item, Collection<T> collection)Converts a structurally typediteminto a nominally typed Java object based on the provided prototypeobject.Itemmold(Collection<T> collection)Converts a nominally typed Javaobjectinto its structurally typed equivalent.Itemmold(Collection<T> collection, Item item)Converts a nominally typed Javaobjectinto its structurally typed equivalent based on the provided prototypeitem.Class<?>type()Returns the reifiedClassof typeT.Collection<T>unit()Returns a default–possiblynull–value of typeT.-
Methods inherited from class swim.structure.Form
forArray, forBigInteger, forBoolean, forBuiltin, forByte, forByteBuffer, forCharacter, forClass, forClass, forCollection, forDouble, forFloat, forInteger, forItem, forList, forLong, forMap, forMap, forNumber, forSet, forShort, forString, forValue, isBuiltin, tag, tag, unit
-
-
-
-
Method Detail
-
unit
public Collection<T> unit()
Description copied from class:FormReturns a default–possiblynull–value of typeT. Used as the fallback return value whencoercingan invalid structural value.- Overrides:
unitin classForm<Collection<T>>
-
type
public Class<?> type()
Description copied from class:FormReturns the reifiedClassof typeT.- Specified by:
typein classForm<Collection<T>>
-
mold
public Item mold(Collection<T> collection, Item item)
Description copied from class:FormConverts a nominally typed Javaobjectinto its structurally typed equivalent based on the provided prototypeitem. The passed-initemis assumed to be non-null. The returnedItemmust never benull.- Overrides:
moldin classForm<Collection<T>>
-
mold
public Item mold(Collection<T> collection)
Description copied from class:FormConverts a nominally typed Javaobjectinto its structurally typed equivalent. The returnedItemmust never benull.- Specified by:
moldin classForm<Collection<T>>
-
cast
public Collection<T> cast(Item item, Collection<T> collection)
Description copied from class:FormConverts a structurally typediteminto a nominally typed Java object based on the provided prototypeobject. The passed-initemis assumed to be non-null. The passed-in prototypeobjectmay benull.- Overrides:
castin classForm<Collection<T>>
-
cast
public Collection<T> cast(Item item)
Description copied from class:FormConverts a structurally typediteminto a nominally typed Java object. The passed-initemis assumed to be non-null.- Specified by:
castin classForm<Collection<T>>
-
-