public class BarcodeTrie
This is an implementation of a trie (prefix tree) in Java. Supports opeations like searching a string, searching a prefix, searching by prefix etc.
public void addBarcode(Barcode barcode)
Adds a Barcode to the trie
barcode - public void addBarcodeNoOverhang(Barcode barcode)
Adds a Barcode to the trie
barcode - public void addAllBarcodes(java.util.Collection<net.maizegenetics.analysis.gbs.Barcode> barcodes)
Add a collection of barcodes to the trie.
barcodes - public void addAllBarcodesNoOverhang(java.util.Collection<net.maizegenetics.analysis.gbs.Barcode> barcodes)
Add a collection of barcodes with OUT overhangs to the trie.
barcodes - public boolean contains(java.lang.String s)
checks if the String is in the trie.
s - public java.util.List getWords(java.lang.String prefix)
get the words in the trie with the given prefix
prefix - public Barcode longestPrefix(java.lang.String input)
Find the longest prefix of a string
input - public static void main(java.lang.String[] args)