private Iterator getIterator ( List glyphs ) { if ( orderAscending ) return glyphs . iterator ( ) ; final ListIterator iter = glyphs . listIterator ( glyphs . size ( ) ) ; return new Iterator ( ) { public boolean hasNext ( ) { return iter . hasPrevious ( ) ; } public Object next ( ) { return iter . previous ( ) ; } public void remove ( ) { iter . remove ( ) ; } } ; }
Returns an iterator for the specified glyphs sorted either ascending or descending .