Finished first loop of JavaDoc generation.

-Fixed: A couple bugs that were found during javadoc generation.

Next loop of javadoc comes later right now i want to add splititerators
and streams
This commit is contained in:
2021-04-26 22:25:09 +02:00
parent f7d311fd09
commit a9a38f7853
22 changed files with 1173 additions and 212 deletions
@@ -62,8 +62,10 @@ public class MAPS
#endif
/**
* Helper method that provides the fastIterator that recycles a single Entry to increase throughput.
* @param map the map the fastiterator should be accessed from
* @return either a normal iterator if it does not support this feature ot a fastiterator
* @param map the map the fastIterator should be accessed from
* @Type(T)
* @ValueType(V)
* @return either a normal iterator if it does not support this feature to a fastIterator
*/
public static GENERIC_KEY_VALUE_BRACES ObjectIterator<MAP.Entry KEY_VALUE_GENERIC_TYPE> fastIterator(MAP KEY_VALUE_GENERIC_TYPE map) {
ObjectSet<MAP.Entry KEY_VALUE_GENERIC_TYPE> entries = map.ENTRY_SET();
@@ -73,7 +75,9 @@ public class MAPS
/**
* Helper method that provides the fastIterable that recycles a single Entry to increase throughput.
* @param map the map the fastIterable should be accessed from
* @return either a normal iterable if it does not support this feature ot a fastIterable
* @Type(T)
* @ValueType(V)
* @return either a normal iterable if it does not support this feature to a fastIterable
*/
public static GENERIC_KEY_VALUE_BRACES ObjectIterable<MAP.Entry KEY_VALUE_GENERIC_TYPE> fastIterable(MAP KEY_VALUE_GENERIC_TYPE map) {
ObjectSet<MAP.Entry KEY_VALUE_GENERIC_TYPE> entries = map.ENTRY_SET();
@@ -89,6 +93,8 @@ public class MAPS
* A Helper function that provides a faster forEach iterator implementation that recycles the entry to increase throughput
* @param map the map the fast forEach should be accessed from
* @param action the action that should be performed on each entry
* @Type(T)
* @ValueType(V)
* @note if the fast forEach is not supported will default to a normal forEach
*/
public static GENERIC_KEY_VALUE_BRACES void fastForEach(MAP KEY_VALUE_GENERIC_TYPE map, Consumer<MAP.Entry KEY_VALUE_GENERIC_TYPE> action) {
@@ -100,6 +106,8 @@ public class MAPS
#if !TYPE_BOOLEAN
/**
* Empty Map getter function that autocasts to the desired Key and Value
* @Type(T)
* @ValueType(V)
* @return empty map of desired type
*/
public static GENERIC_KEY_VALUE_BRACES MAP KEY_VALUE_GENERIC_TYPE emptyMap() {
@@ -113,6 +121,8 @@ public class MAPS
/**
* Helper function that creates a Helper wrapper to synchronize access into the map.
* @param map the map that should be synchronized
* @Type(T)
* @ValueType(V)
* @return a synchronized Map
* @note if the inputted map is already synchronized then it will just return it instead
* @note iterators do not support synchronization
@@ -122,6 +132,8 @@ public class MAPS
* Helper function that creates a Helper wrapper to synchronize access with custom access control into the map.
* @param map the map that should be synchronized
* @param mutex the object that controls access
* @Type(T)
* @ValueType(V)
* @return a synchronized Map
* @note if the inputted map is already synchronized then it will just return it instead
* @note iterators do not support synchronization
@@ -131,6 +143,8 @@ public class MAPS
/**
* Helper function that creates a Helper wrapper to synchronize access into the SortedMap.
* @param map the SortedMap that should be synchronized
* @Type(T)
* @ValueType(V)
* @return a synchronized SortedMap
* @note if the inputted map is already synchronized then it will just return it instead
* @note iterators do not support synchronization
@@ -140,6 +154,8 @@ public class MAPS
* Helper function that creates a Helper wrapper to synchronize access with custom access control into the SortedMap.
* @param map the SortedMap that should be synchronized
* @param mutex the object that controls access
* @Type(T)
* @ValueType(V)
* @return a synchronized SortedMap
* @note if the inputted map is already synchronized then it will just return it instead
* @note iterators do not support synchronization
@@ -149,6 +165,8 @@ public class MAPS
/**
* Helper function that creates a Helper wrapper to synchronize access into the NavigableMap.
* @param map the NavigableMap that should be synchronized
* @Type(T)
* @ValueType(V)
* @return a synchronized NavigableMap
* @note if the inputted map is already synchronized then it will just return it instead
* @note iterators do not support synchronization
@@ -158,6 +176,8 @@ public class MAPS
* Helper function that creates a Helper wrapper to synchronize access with custom access control into the NavigableMap.
* @param map the NavigableMap that should be synchronized
* @param mutex the object that controls access
* @Type(T)
* @ValueType(V)
* @return a synchronized NavigableMap
* @note if the inputted map is already synchronized then it will just return it instead
* @note iterators do not support synchronization
@@ -167,6 +187,8 @@ public class MAPS
/**
* A Helper function that creates a Helper wrapper to only allow Read Access into the Map
* @param map the map that should be made Unmodifiable
* @Type(T)
* @ValueType(V)
* @return a unmodifiable Map
* @note if the inputted map is already unmodifiable then it will just return it instead
*/
@@ -174,6 +196,8 @@ public class MAPS
/**
* A Helper function that creates a Helper wrapper to only allow Read Access into the SortedMap
* @param map the SortedMap that should be made Unmodifiable
* @Type(T)
* @ValueType(V)
* @return a unmodifiable SortedMap
* @note if the inputted SortedMap is already unmodifiable then it will just return it instead
*/
@@ -181,6 +205,8 @@ public class MAPS
/**
* A Helper function that creates a Helper wrapper to only allow Read Access into NavigableMap Map
* @param map the NavigableMap that should be made Unmodifiable
* @Type(T)
* @ValueType(V)
* @return a unmodifiable NavigableMap
* @note if the inputted NavigableMap is already unmodifiable then it will just return it instead
*/
@@ -188,12 +214,16 @@ public class MAPS
/**
* A Helper function that creates a Unmodifyable Entry
* @param entry the Entry that should be made unmodifyable
* @Type(T)
* @ValueType(V)
* @return a Unmodifyable Entry
*/
public static GENERIC_KEY_VALUE_BRACES MAP.Entry KEY_VALUE_GENERIC_TYPE unmodifyableEntry(MAP.Entry KEY_VALUE_GENERIC_TYPE entry) { return entry instanceof UnmodifyableEntry ? entry : new UnmodifyableEntryKV_BRACES(entry); }
/**
* A Helper function that creates a Unmodifyable Entry
* @param entry the Entry that should be made unmodifyable
* @Type(T)
* @ValueType(V)
* @return a Unmodifyable Entry
*/
public static GENERIC_KEY_VALUE_BRACES MAP.Entry KEY_VALUE_GENERIC_TYPE unmodifyableEntry(Map.Entry<CLASS_TYPE, CLASS_VALUE_TYPE> entry) { return entry instanceof UnmodifyableEntry ? (UnmodifyableEntry KEY_VALUE_GENERIC_TYPE)entry : new UnmodifyableEntryKV_BRACES(entry); }
@@ -203,6 +233,8 @@ public class MAPS
* This reduces overhead that normal Map implementations have.
* @param key the key that should be turned into a singleton
* @param value the value that should be turned into a singleton
* @Type(T)
* @ValueType(V)
* @return a unmodifyable Singleton map.
*/
public static GENERIC_KEY_VALUE_BRACES MAP KEY_VALUE_GENERIC_TYPE singletonMap(KEY_TYPE key, VALUE_TYPE value) { return new SingletonMapKV_BRACES(key, value); }
@@ -219,12 +251,7 @@ public class MAPS
VALUE_COLLECTION VALUE_GENERIC_TYPE values;
ObjectSet<MAP.Entry KEY_VALUE_GENERIC_TYPE> entrySet;
/**
* Default constructor
* @param key the key that should be used
* @param value the value that should be used
*/
public SingletonMap(KEY_TYPE key, VALUE_TYPE value) {
SingletonMap(KEY_TYPE key, VALUE_TYPE value) {
this.key = key;
this.value = value;
}
@@ -308,19 +335,11 @@ public class MAPS
*/
public static class UnmodifyableEntry KEY_VALUE_GENERIC_TYPE extends ABSTRACT_MAP.BasicEntry KEY_VALUE_GENERIC_TYPE {
/**
* The boxed constructor that will automatically unbox the values
* @param entry the entry that should be used
*/
public UnmodifyableEntry(Map.Entry<CLASS_TYPE, CLASS_VALUE_TYPE> entry) {
UnmodifyableEntry(Map.Entry<CLASS_TYPE, CLASS_VALUE_TYPE> entry) {
super(entry.getKey(), entry.getValue());
}
/**
* The Unboxed constructor that should be copied from
* @param entry the entry that should be used
*/
public UnmodifyableEntry(MAP.Entry KEY_VALUE_GENERIC_TYPE entry) {
UnmodifyableEntry(MAP.Entry KEY_VALUE_GENERIC_TYPE entry) {
super(entry.ENTRY_KEY(), entry.ENTRY_VALUE());
}
@@ -336,11 +355,7 @@ public class MAPS
public static class UnmodifyableNavigableMap KEY_VALUE_GENERIC_TYPE extends UnmodifyableSortedMap KEY_VALUE_GENERIC_TYPE implements NAVIGABLE_MAP KEY_VALUE_GENERIC_TYPE {
NAVIGABLE_MAP KEY_VALUE_GENERIC_TYPE map;
/**
* Default constructor
* @param map the NavigableMap that should be made unmodifyable
*/
public UnmodifyableNavigableMap(NAVIGABLE_MAP KEY_VALUE_GENERIC_TYPE map) {
UnmodifyableNavigableMap(NAVIGABLE_MAP KEY_VALUE_GENERIC_TYPE map) {
super(map);
this.map = map;
}
@@ -407,11 +422,7 @@ public class MAPS
public static class UnmodifyableSortedMap KEY_VALUE_GENERIC_TYPE extends UnmodifyableMap KEY_VALUE_GENERIC_TYPE implements SORTED_MAP KEY_VALUE_GENERIC_TYPE {
SORTED_MAP KEY_VALUE_GENERIC_TYPE map;
/**
* Default constructor
* @param map the SortedMap that should be made unmodifyable
*/
public UnmodifyableSortedMap(SORTED_MAP KEY_VALUE_GENERIC_TYPE map) {
UnmodifyableSortedMap(SORTED_MAP KEY_VALUE_GENERIC_TYPE map) {
super(map);
this.map = map;
}
@@ -461,11 +472,7 @@ public class MAPS
SET KEY_GENERIC_TYPE keys;
ObjectSet<MAP.Entry KEY_VALUE_GENERIC_TYPE> entrySet;
/**
* Default constructor
* @param map the Map that should be made unmodifyable
*/
public UnmodifyableMap(MAP KEY_VALUE_GENERIC_TYPE map) {
UnmodifyableMap(MAP KEY_VALUE_GENERIC_TYPE map) {
this.map = map;
}
@@ -518,11 +525,7 @@ public class MAPS
{
ObjectSet<MAP.Entry KEY_VALUE_GENERIC_TYPE> s;
/**
* Default constructor
* @param c the EntrySet that should be made unmodifyable
*/
public UnmodifyableEntrySet(ObjectSet<MAP.Entry KEY_VALUE_GENERIC_TYPE> c)
UnmodifyableEntrySet(ObjectSet<MAP.Entry KEY_VALUE_GENERIC_TYPE> c)
{
super(c);
s = c;
@@ -554,21 +557,12 @@ public class MAPS
public static class SynchronizedNavigableMap KEY_VALUE_GENERIC_TYPE extends SynchronizedSortedMap KEY_VALUE_GENERIC_TYPE implements NAVIGABLE_MAP KEY_VALUE_GENERIC_TYPE {
NAVIGABLE_MAP KEY_VALUE_GENERIC_TYPE map;
/**
* Default constructor
* @param map the map that should be synchronized
*/
public SynchronizedNavigableMap(NAVIGABLE_MAP KEY_VALUE_GENERIC_TYPE map) {
SynchronizedNavigableMap(NAVIGABLE_MAP KEY_VALUE_GENERIC_TYPE map) {
super(map);
this.map = map;
}
/**
* Constructor with Access Control
* @param map the map that should be synchronized
* @param mutex the access controller
*/
public SynchronizedNavigableMap(NAVIGABLE_MAP KEY_VALUE_GENERIC_TYPE map, Object mutex) {
SynchronizedNavigableMap(NAVIGABLE_MAP KEY_VALUE_GENERIC_TYPE map, Object mutex) {
super(map, mutex);
this.map = map;
}
@@ -677,21 +671,12 @@ public class MAPS
public static class SynchronizedSortedMap KEY_VALUE_GENERIC_TYPE extends SynchronizedMap KEY_VALUE_GENERIC_TYPE implements SORTED_MAP KEY_VALUE_GENERIC_TYPE {
SORTED_MAP KEY_VALUE_GENERIC_TYPE map;
/**
* Default constructor
* @param map the map that should be synchronized
*/
public SynchronizedSortedMap(SORTED_MAP KEY_VALUE_GENERIC_TYPE map) {
SynchronizedSortedMap(SORTED_MAP KEY_VALUE_GENERIC_TYPE map) {
super(map);
this.map = map;
}
/**
* Constructor with Access Control
* @param map the map that should be synchronized
* @param mutex the access controller
*/
public SynchronizedSortedMap(SORTED_MAP KEY_VALUE_GENERIC_TYPE map, Object mutex) {
SynchronizedSortedMap(SORTED_MAP KEY_VALUE_GENERIC_TYPE map, Object mutex) {
super(map, mutex);
this.map = map;
}
@@ -760,21 +745,12 @@ public class MAPS
protected Object mutex;
/**
* Default constructor
* @param map the map that should be synchronized
*/
public SynchronizedMap(MAP KEY_VALUE_GENERIC_TYPE map) {
SynchronizedMap(MAP KEY_VALUE_GENERIC_TYPE map) {
this.map = map;
mutex = this;
}
/**
* Constructor with Access Control
* @param map the map that should be synchronized
* @param mutex the access controller
*/
public SynchronizedMap(MAP KEY_VALUE_GENERIC_TYPE map, Object mutex) {
SynchronizedMap(MAP KEY_VALUE_GENERIC_TYPE map, Object mutex) {
this.map = map;
this.mutex = mutex;
}