Package io.permazen.core
Interface IndexSwitch<R>
- Type Parameters:
R
- switch method return type
public interface IndexSwitch<R>
Visitor pattern interface for
Index
es.- See Also:
-
Method Summary
Modifier and TypeMethodDescriptiondefault <C extends Collection<E>,
E>
RcaseCollectionElementIndex
(CollectionElementIndex<C, E> index) Visitor pattern roll-up method.default <C,
T> R caseComplexSubFieldIndex
(ComplexSubFieldIndex<C, T> index) Visitor pattern roll-up method.default R
caseCompositeIndex
(CompositeIndex index) Handle aCompositeIndex
.default R
Visitor pattern roll-up method.default <E> R
caseListElementIndex
(ListElementIndex<E> index) Handle aListElementIndex
.default <K,
V> R caseMapKeyIndex
(MapKeyIndex<K, V> index) Handle aMapKeyIndex
.default <K,
V> R caseMapValueIndex
(MapValueIndex<K, V> index) Handle aMapValueIndex
.default <E> R
caseSetElementIndex
(SetElementIndex<E> index) Handle aSetElementIndex
.default <T> R
caseSimpleFieldIndex
(SimpleFieldIndex<T> index) Handle aSimpleFieldIndex
.default <T> R
caseSimpleIndex
(SimpleIndex<T> index) Visitor pattern roll-up method.
-
Method Details
-
caseSimpleFieldIndex
Handle aSimpleFieldIndex
.The implementation in
IndexSwitch
delegates tocaseSimpleIndex()
.- Type Parameters:
T
- field value type- Parameters:
index
- visiting index- Returns:
- visitor return value
-
caseListElementIndex
Handle aListElementIndex
.The implementation in
IndexSwitch
delegates tocaseCollectionElementIndex()
.- Type Parameters:
E
- list element type- Parameters:
index
- visiting index- Returns:
- visitor return value
-
caseSetElementIndex
Handle aSetElementIndex
.The implementation in
IndexSwitch
delegates tocaseCollectionElementIndex()
.- Type Parameters:
E
- set element type- Parameters:
index
- visiting index- Returns:
- visitor return value
-
caseMapKeyIndex
Handle aMapKeyIndex
.The implementation in
IndexSwitch
delegates tocaseComplexSubFieldIndex()
.- Type Parameters:
K
- map key typeV
- map value type- Parameters:
index
- visiting index- Returns:
- visitor return value
-
caseMapValueIndex
Handle aMapValueIndex
.The implementation in
IndexSwitch
delegates tocaseComplexSubFieldIndex()
.- Type Parameters:
K
- map key typeV
- map value type- Parameters:
index
- visiting index- Returns:
- visitor return value
-
caseCompositeIndex
Handle aCompositeIndex
.The implementation in
IndexSwitch
delegates tocaseIndex()
.- Parameters:
index
- visiting index- Returns:
- visitor return value
-
caseCollectionElementIndex
default <C extends Collection<E>,E> R caseCollectionElementIndex(CollectionElementIndex<C, E> index) Visitor pattern roll-up method.The implementation in
IndexSwitch
delegates tocaseComplexSubFieldIndex()
.- Type Parameters:
C
- field value typeE
- collection element type- Parameters:
index
- visiting index- Returns:
- visitor return value
-
caseComplexSubFieldIndex
Visitor pattern roll-up method.The implementation in
IndexSwitch
delegates tocaseSimpleIndex()
.- Type Parameters:
T
- field value type- Parameters:
index
- visiting index- Returns:
- visitor return value
-
caseSimpleIndex
Visitor pattern roll-up method.The implementation in
IndexSwitch
delegates tocaseIndex()
.- Type Parameters:
T
- field value type- Parameters:
index
- visiting index- Returns:
- visitor return value
-
caseIndex
Visitor pattern roll-up method.The implementation in
IndexSwitch
always throwsUnsupportedOperationException
.- Parameters:
index
- visiting index- Returns:
- visitor return value
-