public PermutationIterator(List<T> list, int size){
				outSize = size;
				totalSize = list.size();
				index = new ArrayList<T>(totalSize);
				current = new ArrayList<Integer>(outSize);
				for(int i = 0; i < outSize; i++){
					current.add(0);
				}
				map = new TreeMap<Integer, Integer>();
				int i = 0;
				for(T t : list){
					if(index.contains(t)){
						int n = index.lastIndexOf(t);
						map.put(n + 1, map.get(n + 1) + 1);
					}
					else{
						index.add(t);
						map.put(++i, 1);
					}
				}
				if(map.size() == 0){
					next = false;
				}
				else if(totalSize < outSize){
					next = false;
				}
				else{
					fill(0);
					ArrayList<Integer> nextCacheValue = new ArrayList<Integer>(outSize);
					nextCacheValue.addAll(current);
					nextCache = nextCacheValue;
					if(nextCache == null){
						next = false;
					}
					else{
						next = true;
					}
				}
			}