protected int countSteps ( LocPathIterator lpi ) { if ( lpi instanceof WalkingIterator ) { WalkingIterator wi = ( WalkingIterator ) lpi ; AxesWalker aw = wi . getFirstWalker ( ) ; int count = 0 ; while ( null != aw ) { count ++ ; aw = aw . getNextWalker ( ) ; } return count ; } else return 1 ; }
Count the steps in a given location path .