Revision 1856
org.gvsig.tools/library/trunk/org.gvsig.tools/org.gvsig.tools.lib/src/main/java/org/gvsig/tools/util/Size64.java | ||
---|---|---|
1 |
package org.gvsig.tools.util; |
|
2 |
|
|
3 |
/** |
|
4 |
* |
|
5 |
* @author jjdelcerro |
|
6 |
*/ |
|
7 |
public interface Size64 { |
|
8 |
|
|
9 |
public long size64(); |
|
10 |
|
|
11 |
} |
org.gvsig.tools/library/trunk/org.gvsig.tools/org.gvsig.tools.lib/src/main/java/org/gvsig/tools/util/UnmodifiableBasicList.java | ||
---|---|---|
7 | 7 |
* |
8 | 8 |
* @author jjdelcerro |
9 | 9 |
*/ |
10 |
public interface UnmodifiableBasicList<T> extends Iterable<T> { |
|
10 |
public interface UnmodifiableBasicList<T> extends GetItem<T>, Size, Iterable<T> {
|
|
11 | 11 |
|
12 |
public T get(int pos); |
|
13 |
|
|
14 |
public int size(); |
|
15 |
|
|
16 | 12 |
public boolean isEmpty(); |
17 | 13 |
|
18 | 14 |
public List<T> toList(); |
org.gvsig.tools/library/trunk/org.gvsig.tools/org.gvsig.tools.lib/src/main/java/org/gvsig/tools/util/UnmodifiableBasicMap.java | ||
---|---|---|
7 | 7 |
* |
8 | 8 |
* @author jjdelcerro |
9 | 9 |
*/ |
10 |
public interface UnmodifiableBasicMap<K,V> extends Iterable<K>{ |
|
10 |
public interface UnmodifiableBasicMap<K,V> extends Size, Iterable<K>{
|
|
11 | 11 |
|
12 | 12 |
public V get(K key); |
13 | 13 |
|
14 |
public int size(); |
|
15 |
|
|
16 | 14 |
public boolean isEmpty(); |
17 | 15 |
|
18 | 16 |
public boolean containsKey(K key); |
org.gvsig.tools/library/trunk/org.gvsig.tools/org.gvsig.tools.lib/src/main/java/org/gvsig/tools/util/GetItem.java | ||
---|---|---|
1 |
package org.gvsig.tools.util; |
|
2 |
|
|
3 |
/** |
|
4 |
* |
|
5 |
* @author jjdelcerro |
|
6 |
*/ |
|
7 |
public interface GetItem<T> { |
|
8 |
|
|
9 |
public T get(int position); |
|
10 |
|
|
11 |
} |
org.gvsig.tools/library/trunk/org.gvsig.tools/org.gvsig.tools.lib/src/main/java/org/gvsig/tools/util/UnmodifiableBasicList64.java | ||
---|---|---|
1 |
|
|
2 |
package org.gvsig.tools.util; |
|
3 |
|
|
4 |
import java.util.List; |
|
5 |
|
|
6 |
/** |
|
7 |
* |
|
8 |
* @author jjdelcerro |
|
9 |
*/ |
|
10 |
public interface UnmodifiableBasicList64<T> extends GetItem64<T>, Size64, Iterable<T> { |
|
11 |
|
|
12 |
public boolean isEmpty(); |
|
13 |
|
|
14 |
public List<T> toList(); |
|
15 |
} |
org.gvsig.tools/library/trunk/org.gvsig.tools/org.gvsig.tools.lib/src/main/java/org/gvsig/tools/util/UnmodifiableBasicList64Adapter.java | ||
---|---|---|
1 |
package org.gvsig.tools.util; |
|
2 |
|
|
3 |
import java.util.Collections; |
|
4 |
import java.util.Iterator; |
|
5 |
import java.util.List; |
|
6 |
|
|
7 |
/** |
|
8 |
* |
|
9 |
* @author jjdelcerro |
|
10 |
* @param <T> |
|
11 |
*/ |
|
12 |
public class UnmodifiableBasicList64Adapter<T> implements UnmodifiableBasicList64<T>, UnmodifiableBasicList<T> { |
|
13 |
|
|
14 |
private final List<T> list; |
|
15 |
|
|
16 |
public UnmodifiableBasicList64Adapter(List<T> list) { |
|
17 |
this.list = list; |
|
18 |
} |
|
19 |
|
|
20 |
@Override |
|
21 |
public T get64(long pos) { |
|
22 |
return this.list.get((int) pos); |
|
23 |
} |
|
24 |
|
|
25 |
@Override |
|
26 |
public int size() { |
|
27 |
return this.list.size(); |
|
28 |
} |
|
29 |
|
|
30 |
@Override |
|
31 |
public T get(int pos) { |
|
32 |
return this.list.get(pos); |
|
33 |
} |
|
34 |
|
|
35 |
@Override |
|
36 |
public long size64() { |
|
37 |
return this.list.size(); |
|
38 |
} |
|
39 |
|
|
40 |
@Override |
|
41 |
public boolean isEmpty() { |
|
42 |
return this.list.isEmpty(); |
|
43 |
} |
|
44 |
|
|
45 |
@Override |
|
46 |
public Iterator<T> iterator() { |
|
47 |
return this.list.iterator(); |
|
48 |
} |
|
49 |
|
|
50 |
@Override |
|
51 |
public List<T> toList() { |
|
52 |
return Collections.unmodifiableList(this.list); |
|
53 |
} |
|
54 |
|
|
55 |
|
|
56 |
} |
org.gvsig.tools/library/trunk/org.gvsig.tools/org.gvsig.tools.lib/src/main/java/org/gvsig/tools/util/GetItem64.java | ||
---|---|---|
1 |
package org.gvsig.tools.util; |
|
2 |
|
|
3 |
/** |
|
4 |
* |
|
5 |
* @author jjdelcerro |
|
6 |
*/ |
|
7 |
public interface GetItem64<T> { |
|
8 |
|
|
9 |
public T get64(long position); |
|
10 |
|
|
11 |
} |
org.gvsig.tools/library/trunk/org.gvsig.tools/org.gvsig.tools.lib/src/main/java/org/gvsig/tools/util/Size.java | ||
---|---|---|
1 |
package org.gvsig.tools.util; |
|
2 |
|
|
3 |
/** |
|
4 |
* |
|
5 |
* @author jjdelcerro |
|
6 |
*/ |
|
7 |
public interface Size { |
|
8 |
|
|
9 |
public int size(); |
|
10 |
|
|
11 |
} |
Also available in: Unified diff