Changeset 30737 in osm for applications/editors/josm/plugins/imagerycache/src/org/mapdb/BTreeMap.java
- Timestamp:
- 2014-10-18T23:07:52+02:00 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/imagerycache/src/org/mapdb/BTreeMap.java
r30532 r30737 114 114 115 115 /** holds node level locks*/ 116 protected final LongConcurrentHashMap<Thread> nodeLocks = new LongConcurrentHashMap< Thread>();116 protected final LongConcurrentHashMap<Thread> nodeLocks = new LongConcurrentHashMap<>(); 117 117 118 118 /** maximal node size allowed in this BTree*/ … … 963 963 protected Entry<K, V> makeEntry(Object key, Object value) { 964 964 if(value instanceof ValRef) throw new InternalError(); 965 return new SimpleImmutableEntry< K, V>((K)key, (V)value);965 return new SimpleImmutableEntry<>((K)key, (V)value); 966 966 } 967 967 … … 1336 1336 if (fromKey == null || toKey == null) 1337 1337 throw new NullPointerException(); 1338 return new SubMap< K,V>1338 return new SubMap<> 1339 1339 ( this, fromKey, fromInclusive, toKey, toInclusive); 1340 1340 } … … 1345 1345 if (toKey == null) 1346 1346 throw new NullPointerException(); 1347 return new SubMap< K,V>1347 return new SubMap<> 1348 1348 (this, null, false, toKey, inclusive); 1349 1349 } … … 1354 1354 if (fromKey == null) 1355 1355 throw new NullPointerException(); 1356 return new SubMap< K,V>1356 return new SubMap<> 1357 1357 (this, fromKey, inclusive, null, false); 1358 1358 } … … 1421 1421 static final <E> List<E> toList(Collection<E> c) { 1422 1422 // Using size() here would be a pessimization. 1423 List<E> list = new ArrayList< E>();1423 List<E> list = new ArrayList<>(); 1424 1424 for (E e : c){ 1425 1425 list.add(e); … … 1506 1506 E toElement, 1507 1507 boolean toInclusive) { 1508 return new KeySet< E>(m.subMap(fromElement, fromInclusive,1508 return new KeySet<>(m.subMap(fromElement, fromInclusive, 1509 1509 toElement, toInclusive),hasValues); 1510 1510 } 1511 1511 @Override 1512 1512 public NavigableSet<E> headSet(E toElement, boolean inclusive) { 1513 return new KeySet< E>(m.headMap(toElement, inclusive),hasValues);1513 return new KeySet<>(m.headMap(toElement, inclusive),hasValues); 1514 1514 } 1515 1515 @Override 1516 1516 public NavigableSet<E> tailSet(E fromElement, boolean inclusive) { 1517 return new KeySet< E>(m.tailMap(fromElement, inclusive),hasValues);1517 return new KeySet<>(m.tailMap(fromElement, inclusive),hasValues); 1518 1518 } 1519 1519 @Override … … 1937 1937 } 1938 1938 } 1939 return new SubMap< K,V>(m, fromKey, fromInclusive,1939 return new SubMap<>(m, fromKey, fromInclusive, 1940 1940 toKey, toInclusive); 1941 1941 } … … 1989 1989 @Override 1990 1990 public NavigableSet<K> navigableKeySet() { 1991 return new KeySet< K>((ConcurrentNavigableMap<K,Object>) this,m.hasValues);1991 return new KeySet<>((ConcurrentNavigableMap<K,Object>) this,m.hasValues); 1992 1992 } 1993 1993 … … 2032 2032 @Override 2033 2033 public NavigableSet<K> keySet() { 2034 return new KeySet< K>((ConcurrentNavigableMap<K,Object>) this, m.hasValues);2034 return new KeySet<>((ConcurrentNavigableMap<K,Object>) this, m.hasValues); 2035 2035 } 2036 2036 … … 2044 2044 @Override 2045 2045 public Set<Entry<K, V>> entrySet() { 2046 return new EntrySet< K, V>(this);2046 return new EntrySet<>(this); 2047 2047 } 2048 2048 … … 2123 2123 Engine snapshot = SnapshotEngine.createSnapshotFor(engine); 2124 2124 2125 return new BTreeMap< K, V>(snapshot,treeRecid, defaultSerializer);2125 return new BTreeMap<>(snapshot,treeRecid, defaultSerializer); 2126 2126 } 2127 2127
Note:
See TracChangeset
for help on using the changeset viewer.
