Package com.globalmentor.collections
Class CharSequenceSuffixTree.AbstractEdgeKey
- java.lang.Object
-
- com.globalmentor.collections.CharSequenceSuffixTree.AbstractEdgeKey
-
- All Implemented Interfaces:
CharSequenceSuffixTree.EdgeKey
- Direct Known Subclasses:
CharSequenceSuffixTree.CharSequenceEdge
- Enclosing class:
- CharSequenceSuffixTree
protected abstract static class CharSequenceSuffixTree.AbstractEdgeKey extends java.lang.Object implements CharSequenceSuffixTree.EdgeKey
An abstract base class that implements hashing and equality for an edge key.- Author:
- Garret Wilson
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
AbstractEdgeKey()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(java.lang.Object object)
This version compares parent node, if any, and first character.int
hashCode()
This version hashes the index of the parent node, if any, and first character.-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.globalmentor.collections.CharSequenceSuffixTree.EdgeKey
getFirstChar, getParentNode
-
-
-
-
Method Detail
-
hashCode
public int hashCode()
This version hashes the index of the parent node, if any, and first character.- Overrides:
hashCode
in classjava.lang.Object
- See Also:
CharSequenceSuffixTree.EdgeKey.getParentNode()
,CharSequenceSuffixTree.EdgeKey.getFirstChar()
-
equals
public boolean equals(java.lang.Object object)
This version compares parent node, if any, and first character.- Overrides:
equals
in classjava.lang.Object
- See Also:
CharSequenceSuffixTree.EdgeKey.getParentNode()
,CharSequenceSuffixTree.EdgeKey.getFirstChar()
-
-