001    /**
002     * Created by IntelliJ IDEA.
003     * User: Wei Wang
004     * Date: Jan 9, 2003
005     * Time: 4:22:21 PM
006     */
007    package EVolve.util.Equators;
008    
009    public abstract class Set {
010        protected int [] data;
011        protected int size;
012        protected int emptySlot;
013        protected int entityNumber;
014    
015        public int size() {
016            return size;
017        }
018    
019        public int getElement(int i) {
020            return data[i];
021        }
022    
023        public boolean setFull() {
024            return emptySlot >= size;
025        }
026    
027        public int getValidSize() {
028            return size;
029        }
030    
031        public int getEntityId(int i) {
032            return data[i];
033        }
034    
035        public abstract void addElement(int element);
036    
037        public abstract Set intersection(Set set);
038    
039        public abstract Set union(Set set);
040    
041        public abstract boolean exist(int element);
042    
043        public abstract int getHashValue();
044    
045        public abstract Set newSet();
046    
047        public abstract boolean equals(Set set, float percent);
048    }