question: public int compareTo ( NameImpl obj ) { if ( this == obj ) { return 0 ; } int len1 = size ( ) ; int len2 = obj . size ( ) ; int n = Math . min ( len1 , len2 ) ; int index1 = 0 , index2 = 0 ; while ( n -- != 0 ) { String comp1 = get ( index1 ++ ) ; String comp2 = obj . get ( index2 ++ ) ; if ( syntaxTrimBlanks ) { comp1 = comp1 . trim ( ) ; comp2 = comp2 . trim ( ) ; } int local ; if ( syntaxCaseInsensitive ) { local = comp1 . compareToIgnoreCase ( comp2 ) ; } else { local = comp1 . compareTo ( comp2 ) ; } if ( local != 0 ) { return local ; } } return len1 - len2 ; }
target:  Compares obj to this NameImpl to determine ordering. Takes into account syntactic properties such as elimination of blanks, case-ignore, etc, if relevant. Note: using syntax of this NameImpl and ignoring that of comparison target.