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)
int
getHashCode(byte[] bytes)
int
getHashCode(byte[] bytes, int offset, int length)
int
getHashCode(String s)
Returns unique hash code for a string.int
getHashCodeForReversedBytes(byte[] bytes)
int
getHashCodeForReversedBytes(byte[] bytes, int offset, int length)
int
getHashCodeForReversedString(String s)
Returns unique hash code for a reversed string.long
getMaximumMatch(byte[] bytes, int offset, int length)
byte[]
getReversedBytes(int hashCode)
String
getReversedString(int hashCode)
Returns reversed string by unique hash code.String
getString(int hashCode)
Returns string by unique hash code.int
size()
-
-
-
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)
-
-