Package io.permazen.core
Interface IndexSwitch<R>
- Type Parameters:
R- switch method return type
public interface IndexSwitch<R>
Visitor pattern interface for
Indexes.- 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 RcaseCompositeIndex(CompositeIndex index) Handle aCompositeIndex.default RVisitor pattern roll-up method.default <E> RcaseListElementIndex(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> RcaseSetElementIndex(SetElementIndex<E> index) Handle aSetElementIndex.default <T> RcaseSimpleFieldIndex(SimpleFieldIndex<T> index) Handle aSimpleFieldIndex.default <T> RcaseSimpleIndex(SimpleIndex<T> index) Visitor pattern roll-up method.
-
Method Details
-
caseSimpleFieldIndex
Handle aSimpleFieldIndex.The implementation in
IndexSwitchdelegates tocaseSimpleIndex().- Type Parameters:
T- field value type- Parameters:
index- visiting index- Returns:
- visitor return value
-
caseListElementIndex
Handle aListElementIndex.The implementation in
IndexSwitchdelegates tocaseCollectionElementIndex().- Type Parameters:
E- list element type- Parameters:
index- visiting index- Returns:
- visitor return value
-
caseSetElementIndex
Handle aSetElementIndex.The implementation in
IndexSwitchdelegates tocaseCollectionElementIndex().- Type Parameters:
E- set element type- Parameters:
index- visiting index- Returns:
- visitor return value
-
caseMapKeyIndex
Handle aMapKeyIndex.The implementation in
IndexSwitchdelegates tocaseComplexSubFieldIndex().- Type Parameters:
K- map key typeV- map value type- Parameters:
index- visiting index- Returns:
- visitor return value
-
caseMapValueIndex
Handle aMapValueIndex.The implementation in
IndexSwitchdelegates tocaseComplexSubFieldIndex().- Type Parameters:
K- map key typeV- map value type- Parameters:
index- visiting index- Returns:
- visitor return value
-
caseCompositeIndex
Handle aCompositeIndex.The implementation in
IndexSwitchdelegates 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
IndexSwitchdelegates 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
IndexSwitchdelegates tocaseSimpleIndex().- Type Parameters:
T- field value type- Parameters:
index- visiting index- Returns:
- visitor return value
-
caseSimpleIndex
Visitor pattern roll-up method.The implementation in
IndexSwitchdelegates tocaseIndex().- Type Parameters:
T- field value type- Parameters:
index- visiting index- Returns:
- visitor return value
-
caseIndex
Visitor pattern roll-up method.The implementation in
IndexSwitchalways throwsUnsupportedOperationException.- Parameters:
index- visiting index- Returns:
- visitor return value
-