Show / Hide Table of Contents

    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
    Namespace: Lucene.Net.Facet.Taxonomy
    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

    An empty CategoryPath

    Declaration
    public static readonly CategoryPath EMPTY
    Field Value
    Type Description
    CategoryPath

    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

    The number of components of this CategoryPath.

    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
    Type Name Description
    CategoryPath other
    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
    | Improve this Doc View Source

    FullPathLength()

    Returns the number of characters needed to represent the path, including delimiter characters, for using with CopyFullPath(Char[], Int32, Char).

    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
    | 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
    Type Description
    CategoryPath
    | 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
    See Also
    ToString(Char)
    | 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
    • Improve this Doc
    • View Source
    Back to top Copyright © 2020 Licensed to the Apache Software Foundation (ASF)