question: private Element firstElement ( Object obj ) { if ( obj == null ) { return null ; } if ( obj instanceof Element ) { return ( Element ) obj ; } else { Collection < Element > elementCollection = castElementCollection ( obj ) ; if ( ! elementCollection . isEmpty ( ) ) { sublistIterator = elementCollection . iterator ( ) ; return sublistIterator . next ( ) ; } } return null ; }
target:  Get the first element from either a singleton or a collection of elements.  This method will also set the sublistIterator as a side effect of retrieving the first element in a collection.