Package org.aksw.commons.index.core
Class StorageNodeAlt2<D,C,V1,V2>
- java.lang.Object
-
- org.aksw.commons.index.core.StorageNodeBase<D,C,V>
-
- org.aksw.commons.index.core.StorageNodeAltBase<D,C,Alt2<V1,V2>>
-
- org.aksw.commons.index.core.StorageNodeAlt2<D,C,V1,V2>
-
- Type Parameters:
D-C-V1-V2-
- All Implemented Interfaces:
StorageNode<D,C,Alt2<V1,V2>>,StorageNodeMutable<D,C,Alt2<V1,V2>>
public class StorageNodeAlt2<D,C,V1,V2> extends StorageNodeAltBase<D,C,Alt2<V1,V2>> implements StorageNodeMutable<D,C,Alt2<V1,V2>>
- Author:
- Claus Stadler 11/09/2020
-
-
Field Summary
Fields Modifier and Type Field Description protected Alt2<? extends StorageNodeMutable<D,C,V1>,? extends StorageNodeMutable<D,C,V2>>children-
Fields inherited from class org.aksw.commons.index.core.StorageNodeBase
tupleAccessor, tupleIdxs
-
-
Constructor Summary
Constructors Constructor Description StorageNodeAlt2(org.aksw.commons.tuple.TupleAccessor<D,C> tupleAccessor, StorageNodeMutable<D,C,V1> child1, StorageNodeMutable<D,C,V2> child2)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanadd(Alt2<V1,V2> childStores, D tupleLike)ObjectchooseSubStore(Alt2<V1,V2> store, int subStoreIdx)voidclear(Alt2<V1,V2> store)Clear a store's content.List<? extends StorageNode<D,C,?>>getChildren()Each node in the storage expression may have 0 or more childrenbooleanisEmpty(Alt2<V1,V2> childStores)Checks whether all child store entries in the list of alternatives are empty (Not to be confused with checking the list of alternatives itself for emptiness)Alt2<V1,V2>newStore()Return of a list with fresh stores of all childrenbooleanremove(Alt2<V1,V2> childStores, D tupleLike)<T> java.util.stream.Stream<?>streamEntries(Alt2<V1,V2> childStores, T tupleLike, org.aksw.commons.tuple.TupleAccessorCore<? super T,? extends C> tupleAccessor)Stream all entries under equality constraints obtained from a tuple-like patternStringtoString()-
Methods inherited from class org.aksw.commons.index.core.StorageNodeAltBase
getKeyComponentRaw, isAltNode, streamerForKeyAndSubStoreAlts, streamerForKeys, streamerForKeysAsComponent, streamerForKeysAsTuples, streamerForValues
-
Methods inherited from class org.aksw.commons.index.core.StorageNodeBase
getKeyTupleIdxs, getTupleAccessor
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.aksw.commons.index.core.StorageNode
chooseSubStoreRaw, getKeyComponentRaw, getKeyTupleIdxs, getPublicDelegate, getStoreAsList, getStoreAsMap, getStoreAsSet, getTupleAccessor, holdsDomainTuples, isAltNode, isDelegate, isListNode, isMapNode, isSetNode, streamEntries, streamEntriesRaw, streamEntriesRaw, streamerForKeyAndSubStoreAlts, streamerForKeys, streamerForKeysAsComponent, streamerForKeysAsTuples, streamerForValues
-
Methods inherited from interface org.aksw.commons.index.core.StorageNodeMutable
addRaw, clearRaw, isEmptyRaw, removeRaw
-
-
-
-
Field Detail
-
children
protected Alt2<? extends StorageNodeMutable<D,C,V1>,? extends StorageNodeMutable<D,C,V2>> children
-
-
Constructor Detail
-
StorageNodeAlt2
public StorageNodeAlt2(org.aksw.commons.tuple.TupleAccessor<D,C> tupleAccessor, StorageNodeMutable<D,C,V1> child1, StorageNodeMutable<D,C,V2> child2)
-
-
Method Detail
-
getChildren
public List<? extends StorageNode<D,C,?>> getChildren()
Description copied from interface:StorageNodeEach node in the storage expression may have 0 or more children- Specified by:
getChildrenin interfaceStorageNode<D,C,V1>- Returns:
-
streamEntries
public <T> java.util.stream.Stream<?> streamEntries(Alt2<V1,V2> childStores, T tupleLike, org.aksw.commons.tuple.TupleAccessorCore<? super T,? extends C> tupleAccessor)
Description copied from interface:StorageNodeStream all entries under equality constraints obtained from a tuple-like pattern- Specified by:
streamEntriesin interfaceStorageNode<D,C,V1>- Returns:
-
newStore
public Alt2<V1,V2> newStore()
Return of a list with fresh stores of all children- Specified by:
newStorein interfaceStorageNodeMutable<D,C,V1>
-
isEmpty
public boolean isEmpty(Alt2<V1,V2> childStores)
Checks whether all child store entries in the list of alternatives are empty (Not to be confused with checking the list of alternatives itself for emptiness)- Specified by:
isEmptyin interfaceStorageNodeMutable<D,C,V1>
-
add
public boolean add(Alt2<V1,V2> childStores, D tupleLike)
- Specified by:
addin interfaceStorageNodeMutable<D,C,V1>
-
remove
public boolean remove(Alt2<V1,V2> childStores, D tupleLike)
- Specified by:
removein interfaceStorageNodeMutable<D,C,V1>
-
chooseSubStore
public Object chooseSubStore(Alt2<V1,V2> store, int subStoreIdx)
- Specified by:
chooseSubStorein interfaceStorageNode<D,C,V1>
-
clear
public void clear(Alt2<V1,V2> store)
Description copied from interface:StorageNodeMutableClear a store's content. Cascades to any sub-stores.- Specified by:
clearin interfaceStorageNodeMutable<D,C,V1>
-
-