src/main/java/de/dfki/lt/loot/jada/IntTrie.java
public T addSequence(int[] ids, T newVal) {
    IntTrie<T> curr = this;
    for (int id : ids) {
      IntTrie<T> node = curr.find(id);
      if (node == null) {
        node = new IntTrie<T>(id);
        if (curr._subs == null) {
          curr._subs = new ArrayList<IntTrie<T>>(1);
        }
        curr._subs.add(node);
      }
      curr = node;
    }
    if (curr._finalId == null)
      curr._finalId = newVal;
    return curr._finalId;
  }
/** Add this int sequence to the trie */
Add this int sequence to the trie
Add this int sequence to the trie
public T addSequence(int[] ids, T newVal) {
    IntTrie<T> curr = this;
    for (int id : ids) {
      IntTrie<T> node = curr.find(id);
      if (node == null) {
        node = new IntTrie<T>(id);
        if (curr._subs == null) {
          curr._subs = new ArrayList<IntTrie<T>>(1);
        }
        curr._subs.add(node);
      }
      curr = node;
    }
    if (curr._finalId == null)
      curr._finalId = newVal;
    return curr._finalId;
  }
public T addSequence ( int [ ] ids , T newVal ) { IntTrie < T > curr = this ; for ( int id : ids ) { IntTrie < T > node = curr . find ( id ) ; if ( node == null ) { node = new IntTrie < T > ( id ) ; if ( curr . _subs == null ) { curr . _subs = new ArrayList < IntTrie < T > > ( 1 ) ; } curr . _subs . add ( node ) ; } curr = node ; } if ( curr . _finalId == null ) curr . _finalId = newVal ; return curr . _finalId ; }
Add this int sequence to the trie
Add this int sequence to the trie