Package io.permazen.core
Class ListField<E>
java.lang.Object
- Type Parameters:
E
- Java type for the list elements
List field.
Permazen list fields have performance characteristics similar to ArrayList
.
-
Field Summary
Fields inherited from class io.permazen.core.CollectionField
ELEMENT_FIELD_NAME
-
Method Summary
Modifier and TypeMethodDescriptionGet the index on this fields's "element" sub-field.byte[]
Get thebyte[]
key in the underlying key/value store corresponding to this field in the specified object and the specified list index.getValue
(Transaction tx, ObjId id) Get the value of this field in the given object.toString()
<R> R
visit
(FieldSwitch<R> target) Apply visitor pattern.Methods inherited from class io.permazen.core.CollectionField
getElementField, getSubFields, hasDefaultValue
Methods inherited from class io.permazen.core.Field
getFullName, getKey, getObjType, getTypeToken
Methods inherited from class io.permazen.core.SchemaItem
getName, getSchema, getSchemaId, getStorageId
-
Method Details
-
getElementIndex
Description copied from class:CollectionField
Get the index on this fields's "element" sub-field.- Overrides:
getElementIndex
in classCollectionField<List<E>,
E> - Returns:
- the index on this field's "element" sub-field
-
getValue
Description copied from class:Field
Get the value of this field in the given object. Does not alter the schema of the object.- Specified by:
getValue
in classCollectionField<List<E>,
E> - Parameters:
tx
- transactionid
- object id- Returns:
- this field's value in the specified object
-
getKey
Get thebyte[]
key in the underlying key/value store corresponding to this field in the specified object and the specified list index.- Parameters:
id
- object IDindex
- list index- Returns:
- the corresponding
KVDatabase
key - Throws:
IllegalArgumentException
- ifid
is null or has the wrong object typeIllegalArgumentException
- ifindex
is negative- See Also:
-
visit
Description copied from class:Field
Apply visitor pattern. -
toString
- Specified by:
toString
in classSchemaItem
-