private void putInList(String[] address) {
        FilterCellSlowStr currentCell = firstCell;
        FilterCellSlowStr nextCell = null;

        for (int i = 0; i < address.length; i++) {
            if (address[i].equals(wildCard) != true) {
                nextCell = currentCell.findNextCell(address[i]);
            } else {
                // rightmost wildcard in string detected
                currentCell.addNewCell(wildCard);
                return;
            }

            if (nextCell == null) { // new address, complete the tree
                for (int j = i; j < address.length; j++) {
                    currentCell = currentCell.addNewCell(address[j]);
                    if (address[j].equals(wildCard)) {
                        return;
                    }
                }
                return;
            }
            currentCell = nextCell;
        }
    }
private void putInList ( String [ ] address ) { FilterCellSlowStr currentCell = firstCell ; FilterCellSlowStr nextCell = null ; for ( int i = 0 ; i < address . length ; i ++ ) { if ( address [ i ] . equals ( wildCard ) != true ) { nextCell = currentCell . findNextCell ( address [ i ] ) ; } else { currentCell . addNewCell ( wildCard ) ; return ; } if ( nextCell == null ) { for ( int j = i ; j < address . length ; j ++ ) { currentCell = currentCell . addNewCell ( address [ j ] ) ; if ( address [ j ] . equals ( wildCard ) ) { return ; } } return ; } currentCell = nextCell ; } }
Add and new address to the address tree, where the new address is formatted
as a string array. The 0th index of the array is the rightmost substring of
the string and so on. Each substring is the chars between two periods (".")
in
a URL address. The last index in the array may be a wildcard ("*").

@param address
String array representation of the address, as described above