Finishing touches for the 0.6.0 release.
This commit is contained in:
+21
@@ -1,6 +1,8 @@
|
||||
package speiger.src.collections.PACKAGE.maps.interfaces;
|
||||
|
||||
import speiger.src.collections.PACKAGE.utils.maps.MAPS;
|
||||
import speiger.src.collections.objects.collections.ObjectBidirectionalIterator;
|
||||
import speiger.src.collections.objects.sets.ObjectOrderedSet;
|
||||
/**
|
||||
* A Special Map Interface giving Access to some really usefull functions
|
||||
* The Idea behind this interface is to allow access to functions that give control to the Order of elements.
|
||||
@@ -98,6 +100,7 @@ public interface ORDERED_MAP KEY_VALUE_GENERIC_TYPE extends MAP KEY_VALUE_GENERI
|
||||
* @return a new SortedMap that is synchronized
|
||||
* @see MAPS#synchronize
|
||||
*/
|
||||
@Override
|
||||
public default ORDERED_MAP KEY_VALUE_GENERIC_TYPE synchronize() { return MAPS.synchronize(this); }
|
||||
|
||||
/**
|
||||
@@ -106,6 +109,7 @@ public interface ORDERED_MAP KEY_VALUE_GENERIC_TYPE extends MAP KEY_VALUE_GENERI
|
||||
* @return a new SortedMap Wrapper that is synchronized
|
||||
* @see MAPS#synchronize
|
||||
*/
|
||||
@Override
|
||||
public default ORDERED_MAP KEY_VALUE_GENERIC_TYPE synchronize(Object mutex) { return MAPS.synchronize(this, mutex); }
|
||||
|
||||
/**
|
||||
@@ -113,5 +117,22 @@ public interface ORDERED_MAP KEY_VALUE_GENERIC_TYPE extends MAP KEY_VALUE_GENERI
|
||||
* @return a new SortedMap Wrapper that is unmodifiable
|
||||
* @see MAPS#unmodifiable
|
||||
*/
|
||||
@Override
|
||||
public default ORDERED_MAP KEY_VALUE_GENERIC_TYPE unmodifiable() { return MAPS.unmodifiable(this); }
|
||||
|
||||
/**
|
||||
* Fast Ordered Entry Set that allows for a faster Entry Iterator by recycling the Entry Object and just exchanging 1 internal value
|
||||
* @Type(T)
|
||||
* @ValueType(V)
|
||||
*/
|
||||
interface FastOrderedSet KEY_VALUE_GENERIC_TYPE extends MAP.FastEntrySet KEY_VALUE_GENERIC_TYPE, ObjectOrderedSet<MAP.Entry KEY_VALUE_GENERIC_TYPE> {
|
||||
@Override
|
||||
public ObjectBidirectionalIterator<MAP.Entry KEY_VALUE_GENERIC_TYPE> fastIterator();
|
||||
/**
|
||||
* Fast iterator that recycles the given Entry object to improve speed and reduce object allocation
|
||||
* @param fromElement that is going to be started from.
|
||||
* @return a improved iterator that starts from the desired element
|
||||
*/
|
||||
public ObjectBidirectionalIterator<MAP.Entry KEY_VALUE_GENERIC_TYPE> fastIterator(KEY_TYPE fromElement);
|
||||
}
|
||||
}
|
||||
+1
-64
@@ -22,71 +22,8 @@ import speiger.src.collections.objects.collections.ObjectBidirectionalIterator;
|
||||
* @note ORDERED_MAP is only extended until 0.6.0 for Compat reasons.
|
||||
* The supported classes already implement ORDERED_MAP directly and will remove SORTED_MAP implementations in favor of ORDERED_MAP instead
|
||||
*/
|
||||
public interface SORTED_MAP KEY_VALUE_GENERIC_TYPE extends SortedMap<CLASS_TYPE, CLASS_VALUE_TYPE>, ORDERED_MAP KEY_VALUE_GENERIC_TYPE
|
||||
public interface SORTED_MAP KEY_VALUE_GENERIC_TYPE extends SortedMap<CLASS_TYPE, CLASS_VALUE_TYPE>, MAP KEY_VALUE_GENERIC_TYPE
|
||||
{
|
||||
/**
|
||||
* A customized put method that allows you to insert into the first index.
|
||||
* @param key the key that should be inserted
|
||||
* @param value the value that should be inserted
|
||||
* @return the previous present or default return value
|
||||
* @see java.util.Map#put(Object, Object)
|
||||
* @note some implementations do not support this method
|
||||
* @deprecated use ORDERED_MAP#putAndMoveToFirst instead (removed in 0.6.0)
|
||||
*/
|
||||
@Deprecated
|
||||
public VALUE_TYPE putAndMoveToFirst(KEY_TYPE key, VALUE_TYPE value);
|
||||
/**
|
||||
* A customized put method that allows you to insert into the last index. (This may be nessesary depending on the implementation)
|
||||
* @param key the key that should be inserted
|
||||
* @param value the value that should be inserted
|
||||
* @return the previous present or default return value
|
||||
* @see java.util.Map#put(Object, Object)
|
||||
* @note some implementations do not support this method
|
||||
* @deprecated use ORDERED_MAP#putAndMoveToLast instead (removed in 0.6.0)
|
||||
*/
|
||||
@Deprecated
|
||||
public VALUE_TYPE putAndMoveToLast(KEY_TYPE key, VALUE_TYPE value);
|
||||
|
||||
/**
|
||||
* A specific move method to move a given key/value to the first index.
|
||||
* @param key that should be moved to the first index
|
||||
* @return true if the value was moved.
|
||||
* @note returns false if the value was not present in the first place
|
||||
* @note some implementations do not support this method
|
||||
* @deprecated use ORDERED_MAP#moveToFirst instead (removed in 0.6.0)
|
||||
*/
|
||||
@Deprecated
|
||||
public boolean moveToFirst(KEY_TYPE key);
|
||||
/**
|
||||
* A specific move method to move a given key/value to the last index.
|
||||
* @param key that should be moved to the first last
|
||||
* @return true if the value was moved.
|
||||
* @note returns false if the value was not present in the first place
|
||||
* @note some implementations do not support this method
|
||||
* @deprecated use ORDERED_MAP#moveToLast instead (removed in 0.6.0)
|
||||
*/
|
||||
@Deprecated
|
||||
public boolean moveToLast(KEY_TYPE key);
|
||||
|
||||
/**
|
||||
* A Specific get method that allows to move teh given key/value int the first index.
|
||||
* @param key that is searched for
|
||||
* @return the given value for the requested key or default return value
|
||||
* @note some implementations do not support this method
|
||||
* @deprecated use ORDERED_MAP#getAndMoveToFirst instead (removed in 0.6.0)
|
||||
*/
|
||||
@Deprecated
|
||||
public VALUE_TYPE getAndMoveToFirst(KEY_TYPE key);
|
||||
/**
|
||||
* A Specific get method that allows to move teh given key/value int the last index.
|
||||
* @param key that is searched for
|
||||
* @return the given value for the requested key or default return value
|
||||
* @note some implementations do not support this method
|
||||
* @deprecated use ORDERED_MAP#getAndMoveToLast instead (removed in 0.6.0)
|
||||
*/
|
||||
@Deprecated
|
||||
public VALUE_TYPE getAndMoveToLast(KEY_TYPE key);
|
||||
|
||||
@Override
|
||||
public COMPARATOR KEY_GENERIC_TYPE comparator();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user