Maps are now copyable too
This commit is contained in:
+13
@@ -554,6 +554,14 @@ public class ARRAY_MAP KEY_VALUE_GENERIC_TYPE extends ABSTRACT_MAP KEY_VALUE_GEN
|
||||
size = 0;
|
||||
}
|
||||
|
||||
public ARRAY_MAP KEY_VALUE_GENERIC_TYPE copy() {
|
||||
ARRAY_MAP KEY_VALUE_GENERIC_TYPE map = new ARRAY_MAPKV_BRACES();
|
||||
map.size = size;
|
||||
map.keys = Arrays.copyOf(keys, keys.length);
|
||||
map.values = Arrays.copyOf(values, keys.length);
|
||||
return map;
|
||||
}
|
||||
|
||||
@Override
|
||||
public COMPARATOR KEY_GENERIC_TYPE comparator() {
|
||||
return null;
|
||||
@@ -981,6 +989,11 @@ public class ARRAY_MAP KEY_VALUE_GENERIC_TYPE extends ABSTRACT_MAP KEY_VALUE_GEN
|
||||
return entrySet;
|
||||
}
|
||||
|
||||
@Override
|
||||
public SubMap copy() {
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
|
||||
@Override
|
||||
public COMPARATOR KEY_GENERIC_TYPE comparator() {
|
||||
return null;
|
||||
|
||||
Reference in New Issue
Block a user