Maps are now copyable too

This commit is contained in:
2021-10-06 18:32:10 +02:00
parent dff173222d
commit 61d7a88c82
16 changed files with 223 additions and 4 deletions
@@ -59,6 +59,15 @@ public interface MAP KEY_VALUE_GENERIC_TYPE extends Map<CLASS_TYPE, CLASS_VALUE_
*/
public MAP KEY_VALUE_GENERIC_TYPE setDefaultReturnValue(VALUE_TYPE v);
/**
* A Function that does a shallow clone of the Map itself.
* This function is more optimized then a copy constructor since the Map does not have to be unsorted/resorted.
* It can be compared to Cloneable but with less exception risk
* @return a Shallow Copy of the Map
* @note Wrappers and view Maps will not support this feature
*/
public MAP KEY_VALUE_GENERIC_TYPE copy();
/**
* Type Specific method to reduce boxing/unboxing of values
* @param key the key that should be inserted,
@@ -10,6 +10,8 @@ import speiger.src.collections.PACKAGE.sets.NAVIGABLE_SET;
*/
public interface NAVIGABLE_MAP KEY_VALUE_GENERIC_TYPE extends SORTED_MAP KEY_VALUE_GENERIC_TYPE, NavigableMap<CLASS_TYPE, CLASS_VALUE_TYPE>
{
@Override
public NAVIGABLE_MAP KEY_VALUE_GENERIC_TYPE copy();
/** @return a Type Specific desendingMap */
@Override
public NAVIGABLE_MAP KEY_VALUE_GENERIC_TYPE descendingMap();
@@ -75,6 +75,9 @@ public interface SORTED_MAP KEY_VALUE_GENERIC_TYPE extends SortedMap<CLASS_TYPE,
@Override
public COMPARATOR KEY_GENERIC_TYPE comparator();
@Override
public SORTED_MAP KEY_VALUE_GENERIC_TYPE copy();
@Override
public SET KEY_GENERIC_TYPE keySet();
@Override