Revision 25751 branches/v2_0_0_prep/libraries/libFMap_dal/src/org/gvsig/fmap/dal/feature/spi/DefaultLongList.java

View differences:

DefaultLongList.java
49 49
	}
50 50

  
51 51
	public Iterator iterator() {
52
		return new LongIterator(list.iterator());
52
		return list.iterator();
53 53
	}
54 54

  
55 55
	public Iterator iterator(long index) {
......
58 58
		}		
59 59
		return list.listIterator((int) index);
60 60
	}
61
	class LongIterator implements Iterator{
62
		private Iterator iterator;
63
		public LongIterator(Iterator iterator) {
64
			this.iterator=iterator;
65
		}
66
		public boolean hasNext() {
67
			return iterator.hasNext();
68
		}
69

  
70
		public Object next() {
71
			Object obj=iterator.next();
72
			if (obj instanceof Integer){
73
				return new Long(((Integer)obj).longValue());
74
			}
75
			return obj;
76
		}
77

  
78
		public void remove() {
79
			iterator.remove();
80
		}
81

  
82
	}
83

  
84 61
}
85 62

  

Also available in: Unified diff