protected ItemState getLastItemState ( String identifer ) { List < ItemState > allStates = changesLog . getAllStates ( ) ; for ( int i = allStates . size ( ) - 1 ; i >= 0 ; i -- ) { ItemState state = allStates . get ( i ) ; if ( state . getData ( ) . getIdentifier ( ) . equals ( identifer ) ) return state ; } return null ; }
Return last item state in changes log . If no state exist return null .