Paths
References[IoId("00000000-955f-4788-8d91-8c0271508d9a")]
[DebuggerDisplay("{DebuggerDisplay}")]
public sealed class Paths : IEnumerable<Path>, IStorable
A sorted collection of unique paths.
Constructors
Properties
Indexers
this[]
#Gets the path at the given index. If implied is true, indices which exceed the collection size will yield valid results instead of IndexOutOfRange exceptions.
Parameters:
| index (int) | |
| method (PathsIndexing) |
Methods
Append
#Append a path to the end of this collection. The path must not already exist within this collection and must be sorted higher than the current ultimate path.
Parameters:
| path (Path) |
CanSimplify
#Test whether this collection of paths can be simplified.
Parameters:
| align (PathAlignment) | Simplification options. |
Returns: True if the collection of paths can be simplified.
CreateConsecutive
#Create a number of consecutive paths by incrementing a template.
Cull
#Remove paths from this collection using a culling pattern.
Parameters:
| pattern (bool[]) | Pattern, true=cull, false=keep. |
Equals
#Determines whether the specified object is equal to the current object.
Parameters:
| obj (object) | The object to compare with the current object. |
Returns:
true if the specified object is equal to the current object; otherwise, false.Overrides: Object.Equals
FromUnchecked
#Create a valid Paths collection from a potentially invalid collection. Null and colliding paths will be omitted.
Parameters:
| paths (IEnumerable<Path>) | Paths. |
FromUnsorted
#Create a Paths instance from a collection of unsorted paths. If the collection contains identical paths, an exception will be thrown.
Parameters:
| paths (IEnumerable<Path>) | Paths. |
Returns: Paths instance.
FromUnsorted<T>
#public static Paths FromUnsorted<T>(IEnumerable<Path> paths, IEnumerable<T> data, out T[] sortedData)
Create a Paths instance from a collection of unsorted paths. If the collection contains identical paths, an exception will be thrown.
Parameters:
| paths (IEnumerable<Path>) | Paths. |
| data (IEnumerable<T>) | Data to sort synchronously. |
| sortedData (out T[]) | Sorted data. |
Returns: Paths instance.
GetHashCode
#Serves as the default hash function.
Returns: A hash code for the current object.
Overrides: Object.GetHashCode
Index
#Gets the index of the given path.
Parameters:
| path (Path) | Path to find. |
Returns: Index of path or -1. Implied path indices are not returned.
Insert
#Insert a path into this collection. The path must not already exist within this collection.
Parameters:
| path (Path) |
MakeIncremental
#Simplify the numbering of a path collection. This means subsequent paths only ever increment by a single unit in a single location. If the paths in this collection have varying length, this method will do nothing.
Returns: Incremented path array.
PartialEquals
#Test whether these paths are a partial subset of some other path collection. That is, whether each path in this collection can be matched up with a path in the super set which is either identical or which starts in a similar way.
Parameters:
| superSet (Paths) |
Simplify
#Simplify this path collection by removing those path elements shared amongst all paths.
Parameters:
| align (PathAlignment) | Simplification options. |
Returns: Simplified path collection.
Operators
| Operation | Result | Description | ||
|---|---|---|---|---|
| int | + | Paths | Paths | Add a prefix to all the paths. |
| Path | + | Paths | Paths | Add a prefix to all the paths. |
| Paths | + | int | Paths | Add a suffix to all the paths. |
| Paths | + | Path | Paths | Add a suffix to all the paths. |
| Paths | == | Paths | bool | Compare two Paths instances for equality. |
| Paths | != | Paths | bool | Compare two Paths instances for inequality. |