public class

CFBytesTrie

extends Object
java.lang.Object
   ↳ com.pnfsoftware.jeb.util.collect.CFBytesTrie<T>

Class Overview

A trie map specialized to handle context-free (CF) binary strings. Context-free here means that the binary strings stored as keys cannot be such that, given a binary string A, there exists a longer binary string B whose prefix is A.

Characteristics/limitations:
- Support for insertion and retrieval only (no removal).
- The null key and the empty key are illegal.
- Null values are illegal.

This class is not thread-safe. This class does not override equals/hashCode/toString.

Implementation notes: the is serializable (at the condition that the stored objects T are also serializable). In order to serialize this class efficiently, both in terms of space and time, a key extractor should be set.

Summary

Nested Classes
interface CFBytesTrie.IKeyExtractor<T>  
class CFBytesTrie.Node  
Public Constructors
CFBytesTrie()
Public Methods
void clear()
String formatInternalState()
T get(byte[] key, boolean exactKey)
T get(byte[] keyarray, int start, int max, boolean exactKey)
List<Couple<byte[], T>> getItems()
IKeyExtractor<T> getKeyExtractor()
List<T> getValues()
boolean isEmpty()
T put(byte[] keyarray, int start, int end, T object)
void put(T object)
void put(byte[] key, T object)
void setKeyExtractor(IKeyExtractor<T> keyExtractor)
int size()
[Expand]
Inherited Methods
From class java.lang.Object

Public Constructors

public CFBytesTrie ()

Public Methods

public void clear ()

public String formatInternalState ()

public T get (byte[] key, boolean exactKey)

public T get (byte[] keyarray, int start, int max, boolean exactKey)

public List<Couple<byte[], T>> getItems ()

public IKeyExtractor<T> getKeyExtractor ()

public List<T> getValues ()

public boolean isEmpty ()

public T put (byte[] keyarray, int start, int end, T object)

public void put (T object)

public void put (byte[] key, T object)

public void setKeyExtractor (IKeyExtractor<T> keyExtractor)

public int size ()