Package org.aksw.commons.index.core
Class StorageNodeAltN<D,C>
- java.lang.Object
-
- org.aksw.commons.index.core.StorageNodeBase<D,C,V>
-
- org.aksw.commons.index.core.StorageNodeAltBase<D,C,Object[]>
-
- org.aksw.commons.index.core.StorageNodeAltN<D,C>
-
- Type Parameters:
D-C-
- All Implemented Interfaces:
StorageNode<D,C,Object[]>,StorageNodeMutable<D,C,Object[]>
public class StorageNodeAltN<D,C> extends StorageNodeAltBase<D,C,Object[]> implements StorageNodeMutable<D,C,Object[]>
- Author:
- Claus Stadler 11/09/2020
-
-
Field Summary
Fields Modifier and Type Field Description protected List<? extends StorageNodeMutable<D,C,?>>children-
Fields inherited from class org.aksw.commons.index.core.StorageNodeBase
tupleAccessor, tupleIdxs
-
-
Constructor Summary
Constructors Constructor Description StorageNodeAltN(org.aksw.commons.tuple.TupleAccessor<D,C> tupleAccessor, List<? extends StorageNodeMutable<D,C,?>> children)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanadd(Object[] childStores, D tupleLike)ObjectchooseSubStore(Object[] store, int subStoreIdx)voidclear(Object[] childStores)Clear a store's content.List<? extends StorageNode<D,C,?>>getChildren()Each node in the storage expression may have 0 or more childrenbooleanisEmpty(Object[] 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)Object[]newStore()Return of a list with fresh stores of all childrenbooleanremove(Object[] childStores, D tupleLike)<T> java.util.stream.Stream<?>streamEntries(Object[] 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 List<? extends StorageNodeMutable<D,C,?>> children
-
-
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,Object[]>- Returns:
-
streamEntries
public <T> java.util.stream.Stream<?> streamEntries(Object[] 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,Object[]>- Returns:
-
newStore
public Object[] newStore()
Return of a list with fresh stores of all children- Specified by:
newStorein interfaceStorageNodeMutable<D,C,Object[]>
-
isEmpty
public boolean isEmpty(Object[] 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,Object[]>
-
add
public boolean add(Object[] childStores, D tupleLike)
- Specified by:
addin interfaceStorageNodeMutable<D,C,Object[]>
-
remove
public boolean remove(Object[] childStores, D tupleLike)
- Specified by:
removein interfaceStorageNodeMutable<D,C,Object[]>
-
clear
public void clear(Object[] childStores)
Description copied from interface:StorageNodeMutableClear a store's content. Cascades to any sub-stores.- Specified by:
clearin interfaceStorageNodeMutable<D,C,Object[]>
-
chooseSubStore
public Object chooseSubStore(Object[] store, int subStoreIdx)
- Specified by:
chooseSubStorein interfaceStorageNode<D,C,Object[]>
-
-