src/main/java/de/dfki/lt/loot/jada/IntTrie.java
public IntTrie<T> add(int val) {
    if (_subs == null) {
      _subs = new ArrayList<IntTrie<T>>();
      _subs.add(new IntTrie<T>(val));
      return _subs.get(0);
    }
    IntTrie<T> toFind = new IntTrie<T>(val);
    int pos = Collections.binarySearch(_subs, toFind);
    if (pos < 0) {
      pos = - pos - 1;
      _subs.add(pos, new IntTrie<T>(val));
    }
    return _subs.get(pos);
  }
/** walk a given branch or create one. Uses binarySearch for finding the
   *  right branch, and inserts in the right position for fast access.
   */
walk a given branch or create one. Uses binarySearch for finding the
right branch, and inserts in the right position for fast access.
walk a given branch or create one . Uses binarySearch for finding the right branch and inserts in the right position for fast access .
public IntTrie<T> add(int val) {
    if (_subs == null) {
      _subs = new ArrayList<IntTrie<T>>();
      _subs.add(new IntTrie<T>(val));
      return _subs.get(0);
    }
    IntTrie<T> toFind = new IntTrie<T>(val);
    int pos = Collections.binarySearch(_subs, toFind);
    if (pos < 0) {
      pos = - pos - 1;
      _subs.add(pos, new IntTrie<T>(val));
    }
    return _subs.get(pos);
  }
public IntTrie < T > add ( int val ) { if ( _subs == null ) { _subs = new ArrayList < IntTrie < T > > ( ) ; _subs . add ( new IntTrie < T > ( val ) ) ; return _subs . get ( 0 ) ; } IntTrie < T > toFind = new IntTrie < T > ( val ) ; int pos = Collections . binarySearch ( _subs , toFind ) ; if ( pos < 0 ) { pos = - pos - 1 ; _subs . add ( pos , new IntTrie < T > ( val ) ) ; } return _subs . get ( pos ) ; }
walk a given branch or create one.
walk a given branch or create one .