001    /**
002     * Copyright 2004-2012 The Kuali Foundation
003     *
004     * Licensed under the Educational Community License, Version 2.0 (the "License");
005     * you may not use this file except in compliance with the License.
006     * You may obtain a copy of the License at
007     *
008     * http://www.opensource.org/licenses/ecl2.php
009     *
010     * Unless required by applicable law or agreed to in writing, software
011     * distributed under the License is distributed on an "AS IS" BASIS,
012     * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
013     * See the License for the specific language governing permissions and
014     * limitations under the License.
015     */
016    package org.kuali.common.threads.listener;
017    
018    import java.util.List;
019    
020    /**
021     * Contains information about a progress event. The list of elements that are being processed, the index of the element
022     * that was just processed, and the element itself.
023     *
024     * @param <T>
025     */
026    public class ProgressEvent<T> {
027        // The list of elements to process before progress is complete
028        List<T> list;
029    
030        // The index to the element in the list that was just processed
031        int index;
032    
033        // The element that was processed
034        T element;
035    
036        public List<T> getList() {
037            return list;
038        }
039    
040        public void setList(List<T> list) {
041            this.list = list;
042        }
043    
044        public int getIndex() {
045            return index;
046        }
047    
048        public void setIndex(int index) {
049            this.index = index;
050        }
051    
052        public T getElement() {
053            return element;
054        }
055    
056        public void setElement(T element) {
057            this.element = element;
058        }
059    
060    }