//////////////////////////////////////////////////////////////////////////////// // // Copyright (C) 2003-2006 Adobe Macromedia Software LLC and its licensors. // All Rights Reserved. // The following is Sample Code and is subject to all restrictions on such code // as contained in the End User License Agreement accompanying this product. // If you have received this file from a source other than Adobe, // then your use, modification, or distribution of it requires // the prior written permission of Adobe. // //////////////////////////////////////////////////////////////////////////////// package { [Bindable] public class lib_flex_store_samples_flexstore_ProductFilter { public var count:int; public var series:String; public var minPrice:Number; public var maxPrice:Number; public var triband:Boolean; public var camera:Boolean; public var video:Boolean; public function lib_flex_store_samples_flexstore_ProductFilter() { super(); } public function accept(product:lib_flex_store_samples_flexstore_Product):Boolean { //price is often the first test so let's fail fast if possible if (minPrice > product.price || maxPrice < product.price) return false; if (series != "All Series" && series != product.series) return false; if (triband && !product.triband) return false; if (camera && !product.camera) return false; if (video && !product.video) return false; return true; } } }