Package io.permazen.core
Interface FieldSwitch<R>
- Type Parameters:
R
- switch method return type
public interface FieldSwitch<R>
Visitor pattern interface for
Field
s.- See Also:
-
Method Summary
Modifier and TypeMethodDescriptiondefault <C extends Collection<E>,
E>
RcaseCollectionField
(CollectionField<C, E> field) Visitor pattern roll-up method.default <T> R
caseComplexField
(ComplexField<T> field) Visitor pattern roll-up method.default R
caseCounterField
(CounterField field) Handle aCounterField
.default R
caseEnumArrayField
(EnumArrayField field) Handle anEnumArrayField
.default R
caseEnumField
(EnumField field) Handle anEnumField
.default <T> R
Visitor pattern roll-up method.default <E> R
caseListField
(ListField<E> field) Handle aListField
.default <K,
V> R caseMapField
(MapField<K, V> field) Handle aMapField
.default R
caseReferenceField
(ReferenceField field) Handle aReferenceField
.default <E> R
caseSetField
(SetField<E> field) Handle aSetField
.default <T> R
caseSimpleField
(SimpleField<T> field) Handle aSimpleField
.
-
Method Details
-
caseSetField
Handle aSetField
.The implementation in
FieldSwitch
delegates tocaseCollectionField()
.- Type Parameters:
E
- set element type- Parameters:
field
- visiting field- Returns:
- visitor return value
-
caseListField
Handle aListField
.The implementation in
FieldSwitch
delegates tocaseCollectionField()
.- Type Parameters:
E
- list element type- Parameters:
field
- visiting field- Returns:
- visitor return value
-
caseMapField
Handle aMapField
.The implementation in
FieldSwitch
delegates tocaseComplexField()
.- Type Parameters:
K
- map key typeV
- map value type- Parameters:
field
- visiting field- Returns:
- visitor return value
-
caseSimpleField
Handle aSimpleField
.The implementation in
FieldSwitch
delegates tocaseField()
.- Type Parameters:
T
- field type- Parameters:
field
- visiting field- Returns:
- visitor return value
-
caseReferenceField
Handle aReferenceField
.The implementation in
FieldSwitch
delegates tocaseSimpleField()
.- Parameters:
field
- visiting field- Returns:
- visitor return value
-
caseCounterField
Handle aCounterField
.The implementation in
FieldSwitch
delegates tocaseField()
.- Parameters:
field
- visiting field- Returns:
- visitor return value
-
caseEnumField
Handle anEnumField
.The implementation in
FieldSwitch
delegates tocaseSimpleField()
.- Parameters:
field
- visiting field- Returns:
- visitor return value
-
caseEnumArrayField
Handle anEnumArrayField
.The implementation in
FieldSwitch
delegates tocaseSimpleField()
.- Parameters:
field
- visiting field- Returns:
- visitor return value
-
caseCollectionField
Visitor pattern roll-up method.The implementation in
FieldSwitch
delegates tocaseComplexField()
.- Type Parameters:
C
- field typeE
- collection element type- Parameters:
field
- visiting field- Returns:
- visitor return value
-
caseComplexField
Visitor pattern roll-up method.The implementation in
FieldSwitch
delegates tocaseField()
.- Type Parameters:
T
- field type- Parameters:
field
- visiting field- Returns:
- visitor return value
-
caseField
Visitor pattern roll-up method.The implementation in
FieldSwitch
always throwsUnsupportedOperationException
.- Type Parameters:
T
- field type- Parameters:
field
- visiting field- Returns:
- visitor return value
-