예제 #1
0
        virtual public object Next()
        {
            _currIndex++;
            //IMPLEMENTATION FOR FILTERING

            //
            return(_collection.GetPolicy(_currIndex)); // RETURN SOMETHING
        }
예제 #2
0
        public Policy_LapsedIterator(PolicyCollection collection) : base(collection)
        {
            _collection = collection;
            _currIndex  = 0;
            InsurancePolicy p;

            do
            {
                p = _collection.GetPolicy(_currIndex);
                if (p == null)
                {
                    break;
                }
            } while (p.State is Policy_LapsedState);
        }