Type parameters:
| T | Type constraint. |
Properties
IsOrderable
#Gets whether this tree has orderable items. That is, whether it contains at least one twig with two or more items, not all of whom are nulls.
LeafCount
#Gets the number of leaf items in this tree (this includes all items and all nulls).
Implements: LeafCount
TypeFlavour
#Gets some information about the generic type parameter of this tree.
Implements: TypeFlavour
Methods
Convert<TQ>
#Convert a tree by applying a functional mapping to all non-null items.
Returns: Tree with converted values, but with the same topology and metadata.
ConvertItems<Q>
#Modify all items in this tree.
public virtual Tree<Q> ConvertItems<Q>()
replaceItem,
Replacement method for non-null items.
nullReplacement = null,
Replacement pear for null values. If not provided, nulls are simply persisted.
Cancellation token.
ConvertPears
#Modify all pears in this tree.
public virtual ITree ConvertPears()
replacePear,
Replacement method for non-null items.
nullReplacement = null,
Replacement method for nulls. If not provided, nulls are simply persisted.
Cancellation token.
ConvertPears<Q>
#Modify all pears in this tree.
public virtual Tree<Q> ConvertPears<Q>()
replacePear,
Replacement method for non-null items.
nullReplacement = null,
Replacement method for nulls. If not provided, nulls are simply persisted.
Cancellation token.
Filter
#Apply one or more rules to all the twigs and all the items in this tree.
Returns: A new tree with only the twigs and items that were valid under the given rule.
Filter
#Apply one or more rules to all the twigs and all the items in this tree.
Returns: A new tree with only the twigs and items that were valid under the given rule.
Flip
#Flip the tree by exchanging the twig indices of all items with one of the path elements.
Returns: Flipped tree.
Implements: ConvertItems
Implements: ConvertPears
Implements: ConvertPears
Implements: Split
Implements: Split
Implements: WithIncrementalPaths
Implements: WithMetaData
Implements: WithMetaData
Implements: WithoutPaths
Implements: WithoutSites
Implements: WithRandomisedTwigs
Implements: WithRenumberedPaths
Implements: WithRenumberedPaths
Implements: WithSimplifiedPaths
IsCoincidentWith
#Test whether a given coverage coincides with this tree.
Returns: True if the coverage is valid.
Implements: IsCoincidentWith
IsCoincidentWith
#Tests whether a given site (path+twig index) is part of this tree.
Returns: True if the site exists within the tree.
Implements: IsCoincidentWith
ModifyItems
#Create a new tree by replacing all items in this tree by some other value.
public virtual Tree<T> ModifyItems()
remove = null,
Method which indicates an item ought to be removed from the tree.
replace = null,
Method for determining whether a replacement is required. If null, every item is traversed.
replaceItem = null,
Method invoked for replacing non-null items.
replaceNull = null,
Method invoked for null items. If not provided, null items will be retained.
Optional cancellation token.
Returns: Modified tree.
NullAt
#Gets whether a specific item is null or not.
Returns: True if item at the given site is null.
Implements: NullAt
NullAt
#Gets whether a specific item is null or not.
Returns: True if item at the given site is null.
Implements: NullAt
Similarity
#Compares two data trees for similarity.
Returns: A TreeSimilarity type. This method never returns the PathsAndListsAndItems value.
Implements: Similarity
Similarity
#Compares two data trees for similarity.
Returns: A TreeSimilarity type.
Split
#ToArrays
#Create a nested array of all items and meta data in all twigs. If there is no meta data whatsoever, this array may be returned as null. If the type constraint is a nullable type, the nullData array will be null.
ToArrays
#Create a nested array of all items and meta data in all twigs. If there is no meta data whatsoever, this array may be returned as null.
ToArrays
#Create a nested array of all items in all twigs.
public abstract void ToArrays()
out T[][]
items
ToString
#Returns a string that represents the current object.
Returns: A string that represents the current object.
Overrides: Object.ToString
ToString
#Format this tree using a specific formatting template.
Returns: String describing the tree.
Implements: ToString
TryConvert<TQ>
#Try and convert this tree into a tree of a specific type.
Returns: Tree of type TQ or null if no conversion could be found.
Implements: TryConvert
TryConvert<TQ>
#Try and convert this tree into a tree of a specific type.
public virtual Tree<TQ> TryConvert<TQ>()
token,
Cancellation token.
record
If not null, conversion messages will be added to this record.
Returns: Tree of type TQ or null if no conversion could be found.
Implements: TryConvert
TryConvert<TQ>
#Try and convert this tree into a tree of a specific type.
Returns: Tree of type TQ or null if no conversion could be found.
Implements: TryConvert
WithIncrementalPaths
#Simplify the numbering of paths by starting at zero and incrementing by one for each element in the sequence.
WithMetaData
#Merge all data from another tree.
public Tree<T> WithMetaData()
source,
Source of meta data. The topology of the source must be identical to the topology of this tree for a meta data merge to work.
mergeBehaviour
Custom data merge behaviour.
WithoutPaths
#Remove the specified paths and corresponding twigs from this tree.
Returns: Modified tree.
WithPaths
#Copy the paths from another tree while keeping the data from this tree. For a successful path copy, the source and the target trees must have the same number of paths.
Returns: Modified tree.
WithRandomisedTwigs
#Randomise the items within the twigs of this tree.
WithReversedTwigs
#Reverse the order of all the items in the twigs of this tree.
Returns: Reversed tree.
WithTopology
#Copy the topology of another tree while keeping the data from this tree. For a successful topology copy, the source and the target trees must have the same number of items.
Returns: modified tree.
WithTrimmedPaths
#Trim the tree by removing the last element in each path and merging twigs together.
Returns: Modified tree.