Class CategoryPath
Holds a sequence of string components, specifying the hierarchical name of a
category.
This is a Lucene.NET EXPERIMENTAL API, use at your own risk
Inheritance
System.Object
CategoryPath
Inherited Members
System.Object.Equals(System.Object, System.Object)
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
Assembly: Lucene.Net.Facet.dll
Syntax
public class CategoryPath : IComparable<CategoryPath>
Constructors
|
Improve this Doc
View Source
CategoryPath(String, Char)
Construct from a given path, separating path components with delimiter
.
Declaration
public CategoryPath(string pathString, char delimiter)
Parameters
Type |
Name |
Description |
System.String |
pathString |
|
System.Char |
delimiter |
|
|
Improve this Doc
View Source
CategoryPath(String[])
Construct from the given path components
.
Declaration
public CategoryPath(params string[] components)
Parameters
Type |
Name |
Description |
System.String[] |
components |
|
Fields
|
Improve this Doc
View Source
EMPTY
Declaration
public static readonly CategoryPath EMPTY
Field Value
Properties
|
Improve this Doc
View Source
Components
The components of this CategoryPath. Note that this array may be
shared with other CategoryPath instances, e.g. as a result of
Subpath(Int32), therefore you should traverse the array up to
Length for this path's components.
Declaration
public string[] Components { get; }
Property Value
Type |
Description |
System.String[] |
|
|
Improve this Doc
View Source
Length
Declaration
public int Length { get; }
Property Value
Type |
Description |
System.Int32 |
|
Methods
|
Improve this Doc
View Source
CompareTo(CategoryPath)
Compares this path with another CategoryPath for lexicographic
order.
Declaration
public virtual int CompareTo(CategoryPath other)
Parameters
Returns
Type |
Description |
System.Int32 |
|
|
Improve this Doc
View Source
CopyFullPath(Char[], Int32, Char)
Copies the path components to the given char[], starting at index
start
. delimiter
is copied between the path components.
Returns the number of chars copied.
NOTE: this method relies on the array being large enough to hold the
components and separators - the amount of needed space can be calculated
with FullPathLength().
Declaration
public virtual int CopyFullPath(char[] buf, int start, char delimiter)
Parameters
Type |
Name |
Description |
System.Char[] |
buf |
|
System.Int32 |
start |
|
System.Char |
delimiter |
|
Returns
Type |
Description |
System.Int32 |
|
|
Improve this Doc
View Source
Equals(Object)
Declaration
public override bool Equals(object obj)
Parameters
Type |
Name |
Description |
System.Object |
obj |
|
Returns
Type |
Description |
System.Boolean |
|
Overrides
System.Object.Equals(System.Object)
|
Improve this Doc
View Source
FullPathLength()
Declaration
public virtual int FullPathLength()
Returns
Type |
Description |
System.Int32 |
|
|
Improve this Doc
View Source
GetHashCode()
Declaration
public override int GetHashCode()
Returns
Type |
Description |
System.Int32 |
|
Overrides
System.Object.GetHashCode()
|
Improve this Doc
View Source
Int64HashCode()
Calculate a 64-bit hash function for this path.
NOTE: This was longHashCode() in Lucene
Declaration
public virtual long Int64HashCode()
Returns
Type |
Description |
System.Int64 |
|
|
Improve this Doc
View Source
Subpath(Int32)
Returns a sub-path of this path up to length
components.
Declaration
public virtual CategoryPath Subpath(int length)
Parameters
Type |
Name |
Description |
System.Int32 |
length |
|
Returns
|
Improve this Doc
View Source
ToString()
Returns a string representation of the path, separating components with
'/'.
Declaration
public override string ToString()
Returns
Type |
Description |
System.String |
|
Overrides
System.Object.ToString()
See Also
|
Improve this Doc
View Source
ToString(Char)
Returns a string representation of the path, separating components with the
given delimiter.
Declaration
public virtual string ToString(char delimiter)
Parameters
Type |
Name |
Description |
System.Char |
delimiter |
|
Returns
Type |
Description |
System.String |
|
Implements
System.IComparable<T>