public Object [ ] getValuesFor ( Filter < S > filter ) throws IllegalStateException { // Traverse filter properties in reverse, since the filter likely was // used to create this FilterValues instance. If so, then no value map // needs to be constructed. PropertyFilterList < S > list = filter . getTailPropertyFilterList ( ) ; if ( list == null ) { return NO_VALUES ; } int i = list . getPreviousRemaining ( ) + 1 ; Object [ ] values = new Object [ i ] ; FilterValues filterValues = this ; FilterValues < S > prevValues = mPrevValues ; for ( ; -- i >= 0 ; list = list . getPrevious ( ) ) { PropertyFilter < S > propFilter = list . getPropertyFilter ( ) ; Object value ; if ( prevValues != null && propFilter == prevValues . mCurrentProperty . getPropertyFilter ( ) ) { value = filterValues . mPrevValue ; filterValues = prevValues ; prevValues = prevValues . mPrevValues ; } else { if ( i > 0 || mValueMap != null ) { value = getAssignedValue ( propFilter ) ; } else { // No need to force value map to be created since this is // the last property to be processed. Do the same scan operation // as performed by buildValueMap, except don't save the results. filterValues = this ; prevValues = mPrevValues ; findValue : { while ( prevValues != null ) { if ( propFilter == prevValues . mCurrentProperty . getPropertyFilter ( ) ) { value = filterValues . mPrevValue ; break findValue ; } filterValues = prevValues ; prevValues = prevValues . mPrevValues ; } throw valueNotFound ( propFilter ) ; } } } values [ i ] = value ; } return values ; }
Returns all values in this object as required by the given Filter . The given Filter must be composed only of the same PropertyFilter instances as used to construct this object . An IllegalStateException will result otherwise .