Package io.permazen.core
Class SetField<E>
java.lang.Object
- Type Parameters:
E
- Java type for the set elements
Set field.
-
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 element.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<NavigableSet<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<NavigableSet<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 element.- Parameters:
id
- object IDelement
- set element- Returns:
- the corresponding
KVDatabase
key - Throws:
IllegalArgumentException
- ifid
is null or has the wrong object type- See Also:
-
visit
Description copied from class:Field
Apply visitor pattern.- Specified by:
visit
in classField<NavigableSet<E>>
- Type Parameters:
R
- visitor return type- Parameters:
target
- target to invoke- Returns:
- return value from the method of
target
corresponding to this instance's type
-
toString
- Specified by:
toString
in classSchemaItem
-