@Override
    public void appendNames(StringBuilder sb, String sep)
    {
        // Let's first get the alphabetized list of all names from main hash
        TreeSet<PrefixedName> ts = new TreeSet<PrefixedName>();
        for (int i = 0; i < mNames.length; ++i) {
            PrefixedName name = mNames[i];
            if (name != null) {
                ts.add(name);
            }
        }

        // then spill area
        if (mBuckets != null) {
            for (int i = 0; i < (mNames.length >> 2); ++i) {
                Bucket b = mBuckets[i];
                while (b != null) {
                    ts.add(b.getName());
                    b = b.getNext();
                }
            }
        }

        // And then append them:
        Iterator<PrefixedName> it = ts.iterator();
        boolean first = true;
        while (it.hasNext()) {
            if (first) {
                first = false;
            } else {
                sb.append(sep);
            }
            sb.append(it.next().toString());
        }
    }
@ Override public void appendNames ( StringBuilder sb , String sep ) { TreeSet < PrefixedName > ts = new TreeSet < PrefixedName > ( ) ; for ( int i = 0 ; i < mNames . length ; ++ i ) { PrefixedName name = mNames [ i ] ; if ( name != null ) { ts . add ( name ) ; } } if ( mBuckets != null ) { for ( int i = 0 ; i < ( mNames . length > > 2 ) ; ++ i ) { Bucket b = mBuckets [ i ] ; while ( b != null ) { ts . add ( b . getName ( ) ) ; b = b . getNext ( ) ; } } } Iterator < PrefixedName > it = ts . iterator ( ) ; boolean first = true ; while ( it . hasNext ( ) ) { if ( first ) { first = false ; } else { sb . append ( sep ) ; } sb . append ( it . next ( ) . toString ( ) ) ; } }
Method called by debug/error handling code, to get a list of
all names contained.