|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.lucene.facet.taxonomy.FacetLabel
public class FacetLabel
Holds a sequence of string components, specifying the hierarchical name of a category.
Field Summary | |
---|---|
String[] |
components
The components of this FacetLabel . |
int |
length
The number of components of this FacetLabel . |
static int |
MAX_CATEGORY_PATH_LENGTH
The maximum number of characters a FacetLabel can have. |
Constructor Summary | |
---|---|
FacetLabel(String... components)
Construct from the given path components. |
|
FacetLabel(String dim,
String[] path)
Construct from the dimension plus the given path components. |
Method Summary | |
---|---|
int |
compareTo(FacetLabel other)
Compares this path with another FacetLabel for lexicographic
order. |
boolean |
equals(Object obj)
|
int |
hashCode()
|
long |
longHashCode()
Calculate a 64-bit hash function for this path. |
FacetLabel |
subpath(int length)
Returns a sub-path of this path up to length components. |
String |
toString()
Returns a string representation of the path. |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final int MAX_CATEGORY_PATH_LENGTH
FacetLabel
can have.
public final String[] components
FacetLabel
. Note that this array may be
shared with other FacetLabel
instances, e.g. as a result of
subpath(int)
, therefore you should traverse the array up to
length
for this path's components.
public final int length
FacetLabel
.
Constructor Detail |
---|
public FacetLabel(String... components)
public FacetLabel(String dim, String[] path)
Method Detail |
---|
public int compareTo(FacetLabel other)
FacetLabel
for lexicographic
order.
compareTo
in interface Comparable<FacetLabel>
public boolean equals(Object obj)
equals
in class Object
public int hashCode()
hashCode
in class Object
public long longHashCode()
NameHashIntCacheLRU
(the
default cache impl for LruTaxonomyWriterCache
) to reduce the chance of
"silent but deadly" collisions.
public FacetLabel subpath(int length)
length
components.
public String toString()
toString
in class Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |