Package com.intellij.util.containers
Class ByteTrie
- java.lang.Object
-
- com.intellij.util.containers.ByteTrie
-
public class ByteTrie extends Object
-
-
Constructor Summary
Constructors Constructor Description ByteTrie()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description byte[]getBytes(int hashCode)intgetHashCode(byte[] bytes)intgetHashCode(byte[] bytes, int offset, int length)intgetHashCode(String s)Returns unique hash code for a string.intgetHashCodeForReversedBytes(byte[] bytes)intgetHashCodeForReversedBytes(byte[] bytes, int offset, int length)intgetHashCodeForReversedString(String s)Returns unique hash code for a reversed string.longgetMaximumMatch(byte[] bytes, int offset, int length)byte[]getReversedBytes(int hashCode)StringgetReversedString(int hashCode)Returns reversed string by unique hash code.StringgetString(int hashCode)Returns string by unique hash code.intsize()
-
-
-
Method Detail
-
size
public int size()
-
getHashCode
public int getHashCode(String s)
Returns unique hash code for a string.- Returns:
- negative - an error occured, 0 - no such string in trie, positive - actual hashcode
-
getString
public String getString(int hashCode)
Returns string by unique hash code.
-
getHashCodeForReversedString
public int getHashCodeForReversedString(String s)
Returns unique hash code for a reversed string.
-
getReversedString
public String getReversedString(int hashCode)
Returns reversed string by unique hash code.
-
getHashCode
public int getHashCode(byte[] bytes)
-
getHashCode
public int getHashCode(byte[] bytes, int offset, int length)
-
getMaximumMatch
public long getMaximumMatch(byte[] bytes, int offset, int length)
-
getBytes
public byte[] getBytes(int hashCode)
-
getHashCodeForReversedBytes
public int getHashCodeForReversedBytes(byte[] bytes)
-
getHashCodeForReversedBytes
public int getHashCodeForReversedBytes(byte[] bytes, int offset, int length)
-
getReversedBytes
public byte[] getReversedBytes(int hashCode)
-
-