Interface Links<L extends Link>
-
- All Superinterfaces:
Cloneable
,GraphEntities<L>
,Iterable<L>
,LongMapWrapper<L>
,ManagedGraphEntities<L>
,ManagedIdEntities<L>
,MapWrapper<Long,L>
- All Known Implementing Classes:
LinksImpl
,MacroscopicLinksImpl
public interface Links<L extends Link> extends ManagedGraphEntities<L>
Primary managed container class for links with access to factory capable of creating new links and registering them on the container directly- Author:
- markr
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description Links
deepClone()
Force clone implementationLinks
deepCloneWithMapping(BiConsumer<L,L> mapper)
Deep clone implementation with mapping retained between original and copies createdLinkFactory
getFactory()
Factory to create instance of graph entity (for this container class)default boolean
hasLink(long id)
verify if link is presentLinks
shallowClone()
shallow clone implementation-
Methods inherited from interface org.goplanit.utils.graph.GraphEntities
forEachMatchingIdIn, getByExternalId, getByXmlId
-
Methods inherited from interface java.lang.Iterable
forEach, iterator, spliterator
-
Methods inherited from interface org.goplanit.utils.wrapper.LongMapWrapper
get, remove
-
Methods inherited from interface org.goplanit.utils.id.ManagedIdEntities
containsKey, getManagedIdClass, groupBy, recreateIds, recreateIds, reset, streamSortedBy
-
Methods inherited from interface org.goplanit.utils.wrapper.MapWrapper
addAll, clear, containsValue, firstMatch, forEachIn, get, getFirst, getKeyByValue, isEmpty, register, remove, removeAll, removeIf, size, stream, streamSorted, toCollection, toMap, valuesAsNewSet
-
-
-
-
Method Detail
-
getFactory
LinkFactory getFactory()
Factory to create instance of graph entity (for this container class)- Specified by:
getFactory
in interfaceGraphEntities<L extends Link>
- Specified by:
getFactory
in interfaceManagedIdEntities<L extends Link>
- Returns:
- entity factory
-
shallowClone
Links shallowClone()
shallow clone implementation- Specified by:
shallowClone
in interfaceGraphEntities<L extends Link>
- Specified by:
shallowClone
in interfaceManagedGraphEntities<L extends Link>
- Specified by:
shallowClone
in interfaceManagedIdEntities<L extends Link>
- Specified by:
shallowClone
in interfaceMapWrapper<Long,L extends Link>
- Returns:
- clone of entities
-
deepClone
Links deepClone()
Force clone implementation- Specified by:
deepClone
in interfaceGraphEntities<L extends Link>
- Specified by:
deepClone
in interfaceManagedGraphEntities<L extends Link>
- Specified by:
deepClone
in interfaceManagedIdEntities<L extends Link>
- Returns:
- clone of entities
-
deepCloneWithMapping
Links deepCloneWithMapping(BiConsumer<L,L> mapper)
Deep clone implementation with mapping retained between original and copies created- Specified by:
deepCloneWithMapping
in interfaceGraphEntities<L extends Link>
- Specified by:
deepCloneWithMapping
in interfaceManagedGraphEntities<L extends Link>
- Specified by:
deepCloneWithMapping
in interfaceManagedIdEntities<L extends Link>
- Parameters:
mapper
- that is applied to each deep copy entity mapping pair of origin and copy- Returns:
- pair with deep copy of entities and mapping from original entities to deep copies of these entities
-
hasLink
default boolean hasLink(long id)
verify if link is present- Parameters:
id
- to check- Returns:
- true when present false otherwise
-
-