UnwrappedEdgeCollection

An intelligent MutableCollection wrapper around an EdgeCollection which supports iterating, adding and removing Node elements. Basis for UnwrappedEdgeList and UnwrappedEdgeSet.

Inheritors

Constructors

Link copied to clipboard
constructor(collection: EdgeCollection<NodeType, EdgeType>)

Types

Link copied to clipboard
inner class Iterator(var edgeIterator: MutableIterator<Edge<NodeType>>) : MutableIterator<NodeType>

Properties

Link copied to clipboard
Link copied to clipboard

This computed property returns the common type in a Collection of Type objects. For example, if two types A and B both derive from the interface C`` then C` would be returned.

Link copied to clipboard
open override val size: Int

Functions

Link copied to clipboard
open override fun add(element: NodeType): Boolean
fun add(element: NodeType, builder: EdgeType.() -> Unit? = null): Boolean
Link copied to clipboard
open override fun addAll(elements: Collection<NodeType>): Boolean
Link copied to clipboard
fun <T : Node> Collection<T>?.byNameOrNull(lookup: String, modifier: SearchModifier): T?

This function returns the first node that matches the name on the supplied list of nodes.

Link copied to clipboard
open override fun clear()
Link copied to clipboard
open operator override fun contains(element: NodeType): Boolean
Link copied to clipboard
open override fun containsAll(elements: Collection<NodeType>): Boolean
Link copied to clipboard
open fun forEach(p0: Consumer<in NodeType>)
Link copied to clipboard
operator fun <T : Node> Collection<T>?.get(predicate: (T) -> Boolean, modifier: SearchModifier = SearchModifier.NONE): T?

A shortcut to call firstOrNull using the [] syntax.

operator fun <T : Node> Collection<T>?.get(lookup: String, modifier: SearchModifier = SearchModifier.NONE): T?

A shortcut to call byNameOrNull using the [] syntax.

Link copied to clipboard
operator fun <T : Node> Collection<T>.invoke(predicate: (T) -> Boolean): List<T>

A shortcut invoke filter on a list of nodes.

operator fun <T : Node> Collection<T>.invoke(lookup: String): List<T>

A shortcut to filter a list of nodes by their name.

Link copied to clipboard
open override fun isEmpty(): Boolean
Link copied to clipboard
open operator override fun iterator(): MutableIterator<NodeType>
Link copied to clipboard
Link copied to clipboard
open override fun remove(element: NodeType): Boolean
Link copied to clipboard
open override fun removeAll(elements: Collection<NodeType>): Boolean
Link copied to clipboard
open fun removeIf(p0: Predicate<in NodeType>): Boolean
Link copied to clipboard
Link copied to clipboard
open override fun retainAll(elements: Collection<NodeType>): Boolean
Link copied to clipboard
open override fun spliterator(): Spliterator<NodeType>
Link copied to clipboard
open fun stream(): Stream<NodeType>
Link copied to clipboard
open fun <T : Any> toArray(p0: IntFunction<Array<T>>): Array<T>
Link copied to clipboard