From 2ca14f4d4f8bec06a94ff2bab2c4f9d61988b70c Mon Sep 17 00:00:00 2001 From: Speiger Date: Sun, 25 Apr 2021 03:45:57 +0200 Subject: [PATCH] First batch of JavaDoc that is being done. -Added: JavaDoc for Map Interfaces. -Added: JavaDoc for Abstract Map/Collection/Set -Added: Ignore JavaDoc for tests/builder code. -Added: More JavaDoc for Arrays. --- build.gradle | 2 +- .../java/speiger/src/builder/ClassType.java | 1 + .../speiger/src/builder/GlobalVariables.java | 9 + .../builder/PrimitiveCollectionsBuilder.java | 1 + .../collections/AbstractCollection.template | 4 + .../functions/function/Function.template | 22 +- .../maps/abstracts/AbstractMap.template | 28 +++ .../templates/maps/interfaces/Map.template | 204 +++++++++++++++++- .../maps/interfaces/NavigableMap.template | 102 +++++++++ .../maps/interfaces/SortedMap.template | 120 ++++++++++- .../templates/sets/AbstractSet.template | 4 + .../templates/utils/Arrays.template | 43 ++++ .../ints/base/BaseInt2IntMapTest.java | 1 + .../base/BaseInt2IntNavigableMapTest.java | 1 + .../ints/base/BaseInt2IntSortedMapTest.java | 1 + .../ints/base/BaseIntCollectionTest.java | 1 + .../ints/base/BaseIntIterableTest.java | 1 + .../ints/base/BaseIntListTest.java | 1 + .../ints/base/BaseIntNavigableSetTest.java | 1 + .../ints/base/BaseIntPriorityQueueTest.java | 1 + .../ints/base/BaseIntSortedSetTest.java | 1 + .../collections/ints/base/IIntArrayTest.java | 1 + .../collections/ints/base/IIntStackTests.java | 1 + .../ints/lists/IntArrayListTest.java | 1 + .../ints/maps/Int2IntAVLTreeMapTest.java | 1 + .../ints/maps/Int2IntArrayMapTest.java | 1 + .../ints/maps/Int2IntCustomHashMapTest.java | 1 + .../ints/maps/Int2IntHashMapTest.java | 1 + .../Int2IntLinkedOpenCustomHashMapTest.java | 1 + .../maps/Int2IntLinkedOpenHashMapTest.java | 1 + .../ints/maps/Int2IntRBTreeMapTest.java | 1 + .../ints/queues/IntArrayFIFOQueueTests.java | 1 + .../queues/IntArrayPriorityQueueTests.java | 1 + .../queues/IntHeapPriorityQueueTests.java | 1 + .../ints/sets/IntAVLTreeSetTests.java | 1 + .../ints/sets/IntArraySetTests.java | 1 + .../ints/sets/IntHashSetTests.java | 1 + .../ints/sets/IntRBTreeSetTests.java | 1 + .../collections/ints/utils/SortingTests.java | 1 + .../src/collections/tests/CollectionTest.java | 1 + .../src/collections/tests/IterableTest.java | 1 + .../src/collections/tests/ListTest.java | 1 + .../src/collections/tests/MapTests.java | 1 + .../collections/tests/NavigableMapTests.java | 1 + .../collections/tests/NavigableSetTest.java | 1 + .../collections/tests/PriorityQueueTest.java | 1 + .../src/collections/tests/SortedMapTests.java | 1 + .../src/collections/tests/SortedSetTest.java | 1 + 48 files changed, 569 insertions(+), 7 deletions(-) diff --git a/build.gradle b/build.gradle index e6a19a6b..6859490f 100644 --- a/build.gradle +++ b/build.gradle @@ -76,7 +76,7 @@ javadoc.failOnError = false javadoc.options.quiet() artifacts { -// archives javadocJar + archives javadocJar archives srcJar } diff --git a/src/builder/java/speiger/src/builder/ClassType.java b/src/builder/java/speiger/src/builder/ClassType.java index bdabca8e..c73d63b0 100644 --- a/src/builder/java/speiger/src/builder/ClassType.java +++ b/src/builder/java/speiger/src/builder/ClassType.java @@ -1,5 +1,6 @@ package speiger.src.builder; +@SuppressWarnings("javadoc") public enum ClassType { BOOLEAN("boolean", "Boolean", "Boolean", "booleans", "BOOLEAN", "false"), diff --git a/src/builder/java/speiger/src/builder/GlobalVariables.java b/src/builder/java/speiger/src/builder/GlobalVariables.java index 4ecb8300..47fca8e6 100644 --- a/src/builder/java/speiger/src/builder/GlobalVariables.java +++ b/src/builder/java/speiger/src/builder/GlobalVariables.java @@ -14,6 +14,7 @@ import speiger.src.builder.mappers.LineMapper; import speiger.src.builder.mappers.SimpleMapper; import speiger.src.builder.processor.TemplateProcess; +@SuppressWarnings("javadoc") public class GlobalVariables { List operators = new ArrayList<>(); @@ -71,6 +72,8 @@ public class GlobalVariables } addComment("@ArrayType", "@param <%s> the type of array that the operation should be applied"); addComment("@Type", "@param <%s> the type of elements maintained by this Collection"); + addValueComment("@ValueArrayType", "@param <%s> the type of array that the operation should be applied"); + addValueComment("@ValueType", "@param <%s> the type of elements maintained by this Collection"); addAnnontion("@PrimitiveOverride", "@Override"); addSimpleMapper("@PrimitiveDoc", ""); addAnnontion("@Primitive", "@Deprecated"); @@ -331,6 +334,12 @@ public class GlobalVariables else operators.add(new LineMapper(type.name()+"["+pattern+"]", pattern)); } + private void addValueComment(String pattern, String value) + { + if(valueType == ClassType.OBJECT) operators.add(new InjectMapper(valueType.name()+"["+pattern+"]", pattern, value).removeBraces()); + else operators.add(new LineMapper(valueType.name()+"["+pattern+"]", pattern)); + } + private InjectMapper addInjectMapper(String pattern, String replacement) { InjectMapper mapper = new InjectMapper(type.name()+"["+pattern+"]", pattern, replacement); diff --git a/src/builder/java/speiger/src/builder/PrimitiveCollectionsBuilder.java b/src/builder/java/speiger/src/builder/PrimitiveCollectionsBuilder.java index 4df5fc6b..5847ef4f 100644 --- a/src/builder/java/speiger/src/builder/PrimitiveCollectionsBuilder.java +++ b/src/builder/java/speiger/src/builder/PrimitiveCollectionsBuilder.java @@ -15,6 +15,7 @@ import java.util.function.Consumer; import speiger.src.builder.processor.TemplateProcess; import speiger.src.builder.processor.TemplateProcessor; +@SuppressWarnings("javadoc") public class PrimitiveCollectionsBuilder extends TemplateProcessor { Map> blocked = new HashMap<>(); diff --git a/src/builder/resources/speiger/assets/collections/templates/collections/AbstractCollection.template b/src/builder/resources/speiger/assets/collections/templates/collections/AbstractCollection.template index f836f099..8c56de7d 100644 --- a/src/builder/resources/speiger/assets/collections/templates/collections/AbstractCollection.template +++ b/src/builder/resources/speiger/assets/collections/templates/collections/AbstractCollection.template @@ -9,6 +9,10 @@ import speiger.src.collections.PACKAGE.collections.COLLECTION; import speiger.src.collections.PACKAGE.utils.ITERATORS; #endif +/** + * Abstract Type Specific Collection that reduces boxing/unboxing + * @Type(T) + */ public abstract class ABSTRACT_COLLECTION KEY_GENERIC_TYPE extends AbstractCollection implements COLLECTION KEY_GENERIC_TYPE { @Override diff --git a/src/builder/resources/speiger/assets/collections/templates/functions/function/Function.template b/src/builder/resources/speiger/assets/collections/templates/functions/function/Function.template index e7388a72..a3a7f7e2 100644 --- a/src/builder/resources/speiger/assets/collections/templates/functions/function/Function.template +++ b/src/builder/resources/speiger/assets/collections/templates/functions/function/Function.template @@ -4,6 +4,11 @@ package speiger.src.collections.PACKAGE.functions.function; import java.util.Objects; #endif +/** + * A Type Specific Function interface that reduces boxing/unboxing and fills the gaps of interfaces that are missing. + * @Type(T) + * @ValueType(V) + */ @FunctionalInterface #if JDK_FUNCTION public interface FUNCTION KEY_VALUE_GENERIC_TYPE extends JAVA_FUNCTION KEY_VALUE_GENERIC_TYPE @@ -11,13 +16,23 @@ public interface FUNCTION KEY_VALUE_GENERIC_TYPE extends JAVA_FUNCTION KEY_VALUE public interface FUNCTION KEY_VALUE_GENERIC_TYPE #endif { + /** + * Type Specific get function to reduce boxing/unboxing + * @param k the value that should be processed + * @return the result of the function + */ public VALUE_TYPE GET_VALUE(KEY_TYPE k); + #if JDK_FUNCTION #if VALUE_BOOLEAN - @Override public default VALUE_TYPE test(KEY_TYPE k) { return GET_VALUE(k); } + /** + * A Type specific and-function helper function that reduces boxing/unboxing + * @param other the other function that should be merged with. + * @return a function that compares values in a and comparason + */ public default FUNCTION KEY_VALUE_GENERIC_TYPE andType(FUNCTION KEY_VALUE_GENERIC_TYPE other) { Objects.requireNonNull(other); return T -> GET_VALUE(T) && other.GET_VALUE(T); @@ -35,6 +50,11 @@ public interface FUNCTION KEY_VALUE_GENERIC_TYPE return T -> !GET_VALUE(T); } + /** + * A Type specific or-function helper function that reduces boxing/unboxing + * @param other the other function that should be merged with. + * @return a function that compares values in a or comparason + */ public default FUNCTION KEY_VALUE_GENERIC_TYPE orType(FUNCTION KEY_VALUE_GENERIC_TYPE other) { Objects.requireNonNull(other); return T -> GET_VALUE(T) || other.GET_VALUE(T); diff --git a/src/builder/resources/speiger/assets/collections/templates/maps/abstracts/AbstractMap.template b/src/builder/resources/speiger/assets/collections/templates/maps/abstracts/AbstractMap.template index 71f40d13..ada8f030 100644 --- a/src/builder/resources/speiger/assets/collections/templates/maps/abstracts/AbstractMap.template +++ b/src/builder/resources/speiger/assets/collections/templates/maps/abstracts/AbstractMap.template @@ -25,6 +25,11 @@ import speiger.src.collections.objects.collections.ObjectIterator; import speiger.src.collections.objects.sets.ObjectSet; #endif +/** + * A Base Implementation of a Type Specific Map to reduce boxing/unboxing + * @Type(T) + * @ValueType(V) + */ public abstract class ABSTRACT_MAP KEY_VALUE_GENERIC_TYPE extends AbstractMap implements MAP KEY_VALUE_GENERIC_TYPE { protected VALUE_TYPE defaultReturnValue = EMPTY_VALUE; @@ -332,23 +337,46 @@ public abstract class ABSTRACT_MAP KEY_VALUE_GENERIC_TYPE extends AbstractMap, FUNCTION KEY_VALUE_GENERIC_TYPE { + /** + * Method to see what the default return value is. + * @return default return value + */ public VALUE_TYPE getDefaultReturnValue(); + /** + * Method to define the default return value if a requested key isn't present + * @param v value that should be the default return value + * @return itself + */ public MAP KEY_VALUE_GENERIC_TYPE setDefaultReturnValue(VALUE_TYPE v); + /** + * Type Specific method to reduce boxing/unboxing of values + * @param key the key that should be inserted, + * @param value the value that should be inserted + * @return the last present value or default return value. + * @see Map#put(Object, Object) + */ public VALUE_TYPE put(KEY_TYPE key, VALUE_TYPE value); + /** + * Type Specific method to reduce boxing/unboxing of values + * @param key the key that should be inserted, + * @param value the value that should be inserted + * @return the last present value or default return value. + * @see Map#putIfAbsent(Object, Object) + */ public VALUE_TYPE putIfAbsent(KEY_TYPE key, VALUE_TYPE value); -#if VALUE_PRIMITIVES - public VALUE_TYPE addTo(KEY_TYPE key, VALUE_TYPE value); -#endif +#if VALUE_PRIMITIVES + /** + * A Helper method to add a primitives together. If key is not present then this functions as a put. + * @param key the key that should be inserted, + * @param value the value that should be inserted / added + * @return the last present value or default return value. + */ + public VALUE_TYPE addTo(KEY_TYPE key, VALUE_TYPE value); + +#endif + /** + * Type Specific function for the bull putting of values + * @param m the elements that should be inserted + */ public void putAll(MAP KEY_VALUE_GENERIC_TYPE m); -#if !TYPE_OBJECT +#if !TYPE_OBJECT + /** + * Type Specific method to reduce boxing/unboxing of values + * @param key element that is searched for + * @return if the key is present + */ public boolean containsKey(KEY_TYPE key); + /** + * @see Map#containsKey(Object) + * @param key that is searched for. + * @return true if found + * @note in some implementations key does not have to be CLASS_TYPE but just have to support equals with CLASS_TYPE. + */ @Override public default boolean containsKey(Object key) { return key instanceof CLASS_TYPE && containsKey(CLASS_TO_KEY(key)); @@ -45,16 +96,38 @@ public interface MAP KEY_VALUE_GENERIC_TYPE extends Map mappingFunction) { REPLACE_VALUES(mappingFunction instanceof UNARY_OPERATOR ? (UNARY_OPERATOR KEY_VALUE_GENERIC_TYPE)mappingFunction : (K, V) -> OBJ_TO_VALUE(mappingFunction.apply(KEY_TO_OBJ(K), VALUE_TO_OBJ(V)))); } @Override + @Primitive public default CLASS_VALUE_TYPE compute(CLASS_TYPE key, BiFunction mappingFunction) { return VALUE_TO_OBJ(COMPUTE(OBJ_TO_KEY(key), mappingFunction instanceof UNARY_OPERATOR ? (UNARY_OPERATOR KEY_VALUE_GENERIC_TYPE)mappingFunction : (K, V) -> OBJ_TO_VALUE(mappingFunction.apply(KEY_TO_OBJ(K), VALUE_TO_OBJ(V))))); } @Override + @Primitive public default CLASS_VALUE_TYPE computeIfAbsent(CLASS_TYPE key, Function mappingFunction) { return VALUE_TO_OBJ(COMPUTE_IF_ABSENT(OBJ_TO_KEY(key), mappingFunction instanceof FUNCTION ? (FUNCTION KEY_VALUE_GENERIC_TYPE)mappingFunction : K -> OBJ_TO_VALUE(mappingFunction.apply(KEY_TO_OBJ(K))))); } @Override + @Primitive public default CLASS_VALUE_TYPE computeIfPresent(CLASS_TYPE key, BiFunction mappingFunction) { return VALUE_TO_OBJ(COMPUTE_IF_PRESENT(OBJ_TO_KEY(key), mappingFunction instanceof UNARY_OPERATOR ? (UNARY_OPERATOR KEY_VALUE_GENERIC_TYPE)mappingFunction : (K, V) -> OBJ_TO_VALUE(mappingFunction.apply(KEY_TO_OBJ(K), VALUE_TO_OBJ(V))))); } @Override + @Primitive public default CLASS_VALUE_TYPE merge(CLASS_TYPE key, CLASS_VALUE_TYPE value, BiFunction mappingFunction) { return VALUE_TO_OBJ(MERGE(OBJ_TO_KEY(key), OBJ_TO_VALUE(value), mappingFunction instanceof VALUE_UNARY_OPERATOR ? (VALUE_UNARY_OPERATOR VALUE_VALUE_GENERIC_TYPE)mappingFunction : (K, V) -> OBJ_TO_VALUE(mappingFunction.apply(VALUE_TO_OBJ(K), VALUE_TO_OBJ(V))))); } + /** + * Type Specific forEach method to reduce boxing/unboxing + * @param action processor of the values that are iterator over + */ public void forEach(BI_CONSUMER KEY_VALUE_GENERIC_TYPE action); @Override + @Primitive public default void forEach(BiConsumer action) { forEach(action instanceof BI_CONSUMER ? (BI_CONSUMER KEY_VALUE_GENERIC_TYPE)action : (K, V) -> action.accept(KEY_TO_OBJ(K), VALUE_TO_OBJ(V))); } @@ -159,37 +316,76 @@ public interface MAP KEY_VALUE_GENERIC_TYPE extends Map> entrySet(); + /** + * Type Sensitive EntrySet to reduce boxing/unboxing and optionally Temp Object Allocation. + * @return a EntrySet of the collection + */ public ObjectSet ENTRY_SET(); #if !TYPE_OBJECT || !VALUE_OBJECT @Override + @Primitive public default CLASS_VALUE_TYPE put(CLASS_TYPE key, CLASS_VALUE_TYPE value) { return VALUE_TO_OBJ(put(OBJ_TO_KEY(key), OBJ_TO_VALUE(value))); } @Override + @Primitive public default CLASS_VALUE_TYPE putIfAbsent(CLASS_TYPE key, CLASS_VALUE_TYPE value) { return VALUE_TO_OBJ(put(OBJ_TO_KEY(key), OBJ_TO_VALUE(value))); } #endif + /** + * Fast Entry set that allows for a faster Entry Iterator by recycling the Entry Object and just exchanging 1 internal value + * @Type(T) + * @ValueType(V) + */ public interface FastEntrySet KEY_VALUE_GENERIC_TYPE extends ObjectSet { + /** + * Fast iterator that recycles the given Entry object to improve speed and reduce object allocation + * @return a Recycling ObjectIterator of the given set + */ public ObjectIterator fastIterator(); + /** + * Fast for each that recycles the given Entry object to improve speed and reduce object allocation + * @param action the action that should be applied to each given entry + */ public default void fastForEach(Consumer action) { forEach(action); } } + /** + * Type Specific Map Entry that reduces boxing/unboxing + * @Type(T) + * @ValueType(V) + */ public interface Entry KEY_VALUE_GENERIC_TYPE extends Map.Entry { #if !TYPE_OBJECT + /** + * Type Specific getKey method that reduces boxing/unboxing + * @return the key of a given Entry + */ public KEY_TYPE ENTRY_KEY(); public default CLASS_TYPE getKey() { return KEY_TO_OBJ(ENTRY_KEY()); } #endif #if !VALUE_OBJECT + /** + * Type Specific getValue method that reduces boxing/unboxing + * @return the value of a given Entry + */ public VALUE_TYPE ENTRY_VALUE(); + /** + * Type Specific setValue method that reduces boxing/unboxing + * @param value the new Value that should be placed in the given entry + * @return the old value of a given entry + * @throws UnsupportedOperationException if the Entry is immutable or not supported + */ public VALUE_TYPE setValue(VALUE_TYPE value); public default CLASS_VALUE_TYPE getValue() { return VALUE_TO_OBJ(ENTRY_VALUE()); } public default CLASS_VALUE_TYPE setValue(CLASS_VALUE_TYPE value) { return VALUE_TO_OBJ(setValue(OBJ_TO_VALUE(value))); } diff --git a/src/builder/resources/speiger/assets/collections/templates/maps/interfaces/NavigableMap.template b/src/builder/resources/speiger/assets/collections/templates/maps/interfaces/NavigableMap.template index bde1704e..4759adf4 100644 --- a/src/builder/resources/speiger/assets/collections/templates/maps/interfaces/NavigableMap.template +++ b/src/builder/resources/speiger/assets/collections/templates/maps/interfaces/NavigableMap.template @@ -3,26 +3,58 @@ package speiger.src.collections.PACKAGE.maps.interfaces; import java.util.NavigableMap; import speiger.src.collections.PACKAGE.sets.NAVIGABLE_SET; +/** + * A Type Specific Navigable Map interface with a couple helper methods + * @Type(T) + * @ValueType(V) + */ public interface NAVIGABLE_MAP KEY_VALUE_GENERIC_TYPE extends SORTED_MAP KEY_VALUE_GENERIC_TYPE, NavigableMap { + /** @return a Type Specific desendingMap */ @Override public NAVIGABLE_MAP KEY_VALUE_GENERIC_TYPE descendingMap(); + /** @return a Type Specific Navigable Key Set */ @Override public NAVIGABLE_SET KEY_GENERIC_TYPE navigableKeySet(); + /** @return a Type Specific Desending Key Set */ @Override public NAVIGABLE_SET KEY_GENERIC_TYPE descendingKeySet(); + /** @return a Type Specific firstEntry */ @Override public MAP.Entry KEY_VALUE_GENERIC_TYPE firstEntry(); + /** @return a Type Specific lastEntry */ @Override public MAP.Entry KEY_VALUE_GENERIC_TYPE lastEntry(); + /** @return a Type Specific pollFirstEntry */ @Override public MAP.Entry KEY_VALUE_GENERIC_TYPE pollFirstEntry(); + /** @return a Type Specific pollLastEntry */ @Override public MAP.Entry KEY_VALUE_GENERIC_TYPE pollLastEntry(); #if !TYPE_OBJECT + /** + * A Type Specific SubMap method to reduce boxing/unboxing + * @param fromKey where the submap should start + * @param fromInclusive if the fromKey is inclusive or not + * @param toKey where the subMap should end + * @param toInclusive if the toKey is inclusive or not + * @return a SubMap that is within the range of the desired range + */ public NAVIGABLE_MAP KEY_VALUE_GENERIC_TYPE subMap(KEY_TYPE fromKey, boolean fromInclusive, KEY_TYPE toKey, boolean toInclusive); + /** + * A Type Specific HeadMap method to reduce boxing/unboxing + * @param toKey where the HeadMap should end + * @param inclusive if the toKey is inclusive or not + * @return a HeadMap that is within the range of the desired range + */ public NAVIGABLE_MAP KEY_VALUE_GENERIC_TYPE headMap(KEY_TYPE toKey, boolean inclusive); + /** + * A Type Specific TailMap method to reduce boxing/unboxing + * @param fromKey where the TailMap should start + * @param inclusive if the fromKey is inclusive or not + * @return a TailMap that is within the range of the desired range + */ public NAVIGABLE_MAP KEY_VALUE_GENERIC_TYPE tailMap(KEY_TYPE fromKey, boolean inclusive); @Override @@ -32,51 +64,121 @@ public interface NAVIGABLE_MAP KEY_VALUE_GENERIC_TYPE extends SORTED_MAP KEY_VAL @Override public default NAVIGABLE_MAP KEY_VALUE_GENERIC_TYPE tailMap(KEY_TYPE fromKey) { return tailMap(fromKey, true); } + /** + * A Helper method to set the max value for SubMaps. (Default: KEY_TYPE.MIN_VALUE) + * @param e the new max value + */ public void setDefaultMaxValue(KEY_TYPE e); + /** + * A Helper method to get the max value for SubMaps. + * @return the default max value. + */ public KEY_TYPE getDefaultMaxValue(); + /** + * A Helper method to set the min value for SubMaps. (Default: KEY_TYPE.MAX_VALUE) + * @param e the new min value + */ public void setDefaultMinValue(KEY_TYPE e); + /** + * A Helper method to get the min value for SubMaps. + * @return the default min value. + */ public KEY_TYPE getDefaultMinValue(); + /** + * A Type Specific lowerKey method to reduce boxing/unboxing. + * @param key that should be compared with. + * @return the greatest lower key that can be found + */ public KEY_TYPE lowerKey(KEY_TYPE key); + /** + * A Type Specific higherKey method to reduce boxing/unboxing. + * @param key that should be compared with. + * @return the lowest higher key that can be found + */ public KEY_TYPE higherKey(KEY_TYPE key); + /** + * A Type Specific floorKey method to reduce boxing/unboxing. + * @param key that should be compared with. + * @return the greatest lower or equal key that can be found + */ public KEY_TYPE floorKey(KEY_TYPE key); + /** + * A Type Specific ceilingKey method to reduce boxing/unboxing. + * @param key that should be compared with. + * @return the lowest higher or equal key that can be found + */ public KEY_TYPE ceilingKey(KEY_TYPE key); + /** + * A Type Specific lowerEntry method to reduce boxing/unboxing. + * @param key that should be compared with. + * @return the greatest lower entry that can be found, or null + */ public MAP.Entry KEY_VALUE_GENERIC_TYPE lowerEntry(KEY_TYPE key); + /** + * A Type Specific higherEntry method to reduce boxing/unboxing. + * @param key that should be compared with. + * @return the lowest higher entry that can be found, or null + */ public MAP.Entry KEY_VALUE_GENERIC_TYPE higherEntry(KEY_TYPE key); + /** + * A Type Specific floorEntry method to reduce boxing/unboxing. + * @param key that should be compared with. + * @return the greatest lower or equal entry that can be found, or null + */ public MAP.Entry KEY_VALUE_GENERIC_TYPE floorEntry(KEY_TYPE key); + /** + * A Type Specific ceilingEntry method to reduce boxing/unboxing. + * @param key that should be compared with. + * @return the lowest higher or equal entry that can be found, or null + */ public MAP.Entry KEY_VALUE_GENERIC_TYPE ceilingEntry(KEY_TYPE key); @Override + @Deprecated public default CLASS_TYPE lowerKey(CLASS_TYPE key) { return KEY_TO_OBJ(lowerKey(OBJ_TO_KEY(key)));} @Override + @Deprecated public default CLASS_TYPE floorKey(CLASS_TYPE key) { return KEY_TO_OBJ(floorKey(OBJ_TO_KEY(key)));} @Override + @Deprecated public default CLASS_TYPE ceilingKey(CLASS_TYPE key) { return KEY_TO_OBJ(ceilingKey(OBJ_TO_KEY(key)));} @Override + @Deprecated public default CLASS_TYPE higherKey(CLASS_TYPE key) { return KEY_TO_OBJ(higherKey(OBJ_TO_KEY(key)));} @Override + @Deprecated default MAP.Entry KEY_VALUE_GENERIC_TYPE lowerEntry(CLASS_TYPE key) { return lowerEntry(OBJ_TO_KEY(key)); } @Override + @Deprecated default MAP.Entry KEY_VALUE_GENERIC_TYPE floorEntry(CLASS_TYPE key) { return floorEntry(OBJ_TO_KEY(key)); } @Override + @Deprecated default MAP.Entry KEY_VALUE_GENERIC_TYPE ceilingEntry(CLASS_TYPE key) { return ceilingEntry(OBJ_TO_KEY(key)); } @Override + @Deprecated default MAP.Entry KEY_VALUE_GENERIC_TYPE higherEntry(CLASS_TYPE key) { return higherEntry(OBJ_TO_KEY(key)); } @Override + @Deprecated default NAVIGABLE_MAP KEY_VALUE_GENERIC_TYPE subMap(CLASS_TYPE fromKey, boolean fromInclusive, CLASS_TYPE toKey, boolean toInclusive) { return subMap(OBJ_TO_KEY(fromKey), fromInclusive, OBJ_TO_KEY(toKey), toInclusive); } @Override + @Deprecated default NAVIGABLE_MAP KEY_VALUE_GENERIC_TYPE headMap(CLASS_TYPE toKey, boolean inclusive) { return headMap(OBJ_TO_KEY(toKey), inclusive); } @Override + @Deprecated default NAVIGABLE_MAP KEY_VALUE_GENERIC_TYPE tailMap(CLASS_TYPE fromKey, boolean inclusive) { return tailMap(OBJ_TO_KEY(fromKey), inclusive); } @Override + @Deprecated default NAVIGABLE_MAP KEY_VALUE_GENERIC_TYPE subMap(CLASS_TYPE fromKey, CLASS_TYPE toKey) { return subMap(OBJ_TO_KEY(fromKey), true, OBJ_TO_KEY(toKey), false); } @Override + @Deprecated default NAVIGABLE_MAP KEY_VALUE_GENERIC_TYPE headMap(CLASS_TYPE toKey) { return headMap(OBJ_TO_KEY(toKey), false); } @Override + @Deprecated default NAVIGABLE_MAP KEY_VALUE_GENERIC_TYPE tailMap(CLASS_TYPE fromKey) { return tailMap(OBJ_TO_KEY(fromKey), true); } #else @Override diff --git a/src/builder/resources/speiger/assets/collections/templates/maps/interfaces/SortedMap.template b/src/builder/resources/speiger/assets/collections/templates/maps/interfaces/SortedMap.template index 40457d41..8d182cba 100644 --- a/src/builder/resources/speiger/assets/collections/templates/maps/interfaces/SortedMap.template +++ b/src/builder/resources/speiger/assets/collections/templates/maps/interfaces/SortedMap.template @@ -13,15 +13,63 @@ import speiger.src.collections.PACKAGE.sets.SET; import speiger.src.collections.objects.sets.ObjectSortedSet; import speiger.src.collections.objects.collections.ObjectBidirectionalIterator; +/** + * A Type Specific {@link SortedMap} interface to reduce boxing/unboxing, with a couple extra methods that allow greater control over maps. + * + * @Type(T) + * @ValueType(V) + */ public interface SORTED_MAP KEY_VALUE_GENERIC_TYPE extends SortedMap, 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 + */ 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 + */ 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 + */ 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 + */ 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 + */ 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 + */ public VALUE_TYPE getAndMoveToLast(KEY_TYPE key); @Override @@ -33,19 +81,69 @@ public interface SORTED_MAP KEY_VALUE_GENERIC_TYPE extends SortedMap { @Override public ObjectBidirectionalIterator fastIterator(); diff --git a/src/builder/resources/speiger/assets/collections/templates/sets/AbstractSet.template b/src/builder/resources/speiger/assets/collections/templates/sets/AbstractSet.template index e5c271e5..2d401fa8 100644 --- a/src/builder/resources/speiger/assets/collections/templates/sets/AbstractSet.template +++ b/src/builder/resources/speiger/assets/collections/templates/sets/AbstractSet.template @@ -7,6 +7,10 @@ import java.util.Set; import speiger.src.collections.PACKAGE.collections.ABSTRACT_COLLECTION; import speiger.src.collections.PACKAGE.collections.ITERATOR; +/** + * Abstract Type Specific Set that reduces boxing/unboxing + * @Type(T) + */ public abstract class ABSTRACT_SET KEY_GENERIC_TYPE extends ABSTRACT_COLLECTION KEY_GENERIC_TYPE implements SET KEY_GENERIC_TYPE { @Override diff --git a/src/builder/resources/speiger/assets/collections/templates/utils/Arrays.template b/src/builder/resources/speiger/assets/collections/templates/utils/Arrays.template index d26897c5..4a0ae936 100644 --- a/src/builder/resources/speiger/assets/collections/templates/utils/Arrays.template +++ b/src/builder/resources/speiger/assets/collections/templates/utils/Arrays.template @@ -17,10 +17,13 @@ import speiger.src.collections.utils.SanityChecks; */ public class ARRAYS { + /** Default Limit for Insertion/Selection Sort */ public static final int BASE_THRESHOLD = 16; + /** Default Threshold for Multithreaded Sorting Algorythm options*/ public static final int PARALLEL_THRESHOLD = 8192; #if !TYPE_OBJECT + /** Empty Array Reference used for Uninitialized Collections */ public static final KEY_TYPE[] EMPTY_ARRAY = new KEY_TYPE[0]; /** @@ -92,6 +95,7 @@ public class ARRAYS } #else + /** Empty Array Reference used for Uninitialized Collections */ public static final Object[] EMPTY_ARRAY = new Object[0]; /** @@ -107,6 +111,15 @@ public class ARRAYS } #endif + /** + * Method to validate if the current value is the lowest value in the heap + * @param data the current heap. + * @param size the size of the heap + * @param index the index that should be validated + * @param comp the comparator to sort the heap. Can be null + * @ArrayType(T) + * @return the index the element was shifted to + */ public static GENERIC_KEY_BRACES int shiftDown(KEY_TYPE[] data, int size, int index, COMPARATOR KEY_SUPER_GENERIC_TYPE comp) { int half = size >>> 1; KEY_TYPE value = data[index]; @@ -136,6 +149,14 @@ public class ARRAYS return index; } + /** + * Method to sort a specific value into the heap. + * @param data the heap itself. + * @param index that should be heapified. + * @param comp the comparator to sort the heap. Can be null + * @ArrayType(T) + * @return the index the element was shifted to + */ public static GENERIC_KEY_BRACES int shiftUp(KEY_TYPE[] data, int index, COMPARATOR KEY_SUPER_GENERIC_TYPE comp) { KEY_TYPE value = data[index]; if(comp != null) { @@ -160,15 +181,37 @@ public class ARRAYS return index; } + /** + * Helper function to create a Heap out of an array. + * @param data the array to heapify + * @param size the current size of elements within the array. + * @param comp the Comparator to sort the array. Can be null + * @ArrayType(T) + * @return the input array + */ public static GENERIC_KEY_BRACES KEY_TYPE[] heapify(KEY_TYPE[] data, int size, COMPARATOR KEY_SUPER_GENERIC_TYPE comp) { for(int i = (size >>> 1) - 1;i>=0;shiftDown(data, size, i--, comp)); return data; } + /** + * Simple Shuffle method for Arrays. + * @param array the elements that should be shuffled + * @ArrayType(T) + * @note This uses the SanityChecks#getRandom + * @return the provided sorted array + */ public static GENERIC_KEY_BRACES KEY_TYPE[] shuffle(KEY_TYPE[] array) { return shuffle(array, SanityChecks.getRandom()); } + /** + * Simple Shuffle method for Arrays. + * @param array the elements that should be shuffled + * @param random the Random Number Generator that should be used for the shuffling + * @ArrayType(T) + * @return the provided sorted array + */ public static GENERIC_KEY_BRACES KEY_TYPE[] shuffle(KEY_TYPE[] array, Random random) { for(int i = array.length-1; i>=0;i--) { int p = random.nextInt(i + 1); diff --git a/src/test/java/speiger/src/collections/ints/base/BaseInt2IntMapTest.java b/src/test/java/speiger/src/collections/ints/base/BaseInt2IntMapTest.java index 2131e745..1c19105b 100644 --- a/src/test/java/speiger/src/collections/ints/base/BaseInt2IntMapTest.java +++ b/src/test/java/speiger/src/collections/ints/base/BaseInt2IntMapTest.java @@ -10,6 +10,7 @@ import speiger.src.collections.ints.maps.interfaces.Int2IntMap; import speiger.src.collections.ints.utils.IntStrategy; import speiger.src.collections.tests.MapTests; +@SuppressWarnings("javadoc") public abstract class BaseInt2IntMapTest { protected static final IntStrategy STRATEGY = new Strategy(); diff --git a/src/test/java/speiger/src/collections/ints/base/BaseInt2IntNavigableMapTest.java b/src/test/java/speiger/src/collections/ints/base/BaseInt2IntNavigableMapTest.java index 4276456c..1772330b 100644 --- a/src/test/java/speiger/src/collections/ints/base/BaseInt2IntNavigableMapTest.java +++ b/src/test/java/speiger/src/collections/ints/base/BaseInt2IntNavigableMapTest.java @@ -8,6 +8,7 @@ import org.junit.Test; import speiger.src.collections.ints.maps.interfaces.Int2IntNavigableMap; import speiger.src.collections.tests.NavigableSetTest; +@SuppressWarnings("javadoc") public abstract class BaseInt2IntNavigableMapTest extends BaseInt2IntSortedMapTest { @Override diff --git a/src/test/java/speiger/src/collections/ints/base/BaseInt2IntSortedMapTest.java b/src/test/java/speiger/src/collections/ints/base/BaseInt2IntSortedMapTest.java index d2d1efb9..608233a5 100644 --- a/src/test/java/speiger/src/collections/ints/base/BaseInt2IntSortedMapTest.java +++ b/src/test/java/speiger/src/collections/ints/base/BaseInt2IntSortedMapTest.java @@ -8,6 +8,7 @@ import org.junit.Test; import speiger.src.collections.ints.maps.interfaces.Int2IntSortedMap; import speiger.src.collections.tests.SortedMapTests; +@SuppressWarnings("javadoc") public abstract class BaseInt2IntSortedMapTest extends BaseInt2IntMapTest { @Override diff --git a/src/test/java/speiger/src/collections/ints/base/BaseIntCollectionTest.java b/src/test/java/speiger/src/collections/ints/base/BaseIntCollectionTest.java index 82f91b29..d57f2b5a 100644 --- a/src/test/java/speiger/src/collections/ints/base/BaseIntCollectionTest.java +++ b/src/test/java/speiger/src/collections/ints/base/BaseIntCollectionTest.java @@ -14,6 +14,7 @@ import speiger.src.collections.ints.utils.IntCollections.SynchronizedCollection; import speiger.src.collections.ints.utils.IntCollections.UnmodifiableCollection; import speiger.src.collections.tests.CollectionTest; +@SuppressWarnings("javadoc") public abstract class BaseIntCollectionTest extends BaseIntIterableTest { protected static final int[] ADD_ARRAY = new int[]{3212, -12, 423, -182, -4912}; diff --git a/src/test/java/speiger/src/collections/ints/base/BaseIntIterableTest.java b/src/test/java/speiger/src/collections/ints/base/BaseIntIterableTest.java index 1fc8a46e..d9a2e2e3 100644 --- a/src/test/java/speiger/src/collections/ints/base/BaseIntIterableTest.java +++ b/src/test/java/speiger/src/collections/ints/base/BaseIntIterableTest.java @@ -10,6 +10,7 @@ import speiger.src.collections.ints.collections.IntIterable; import speiger.src.collections.ints.collections.IntIterator; import speiger.src.collections.tests.IterableTest; +@SuppressWarnings("javadoc") public abstract class BaseIntIterableTest { protected static final int[] EMPTY_ARRAY = new int[0]; diff --git a/src/test/java/speiger/src/collections/ints/base/BaseIntListTest.java b/src/test/java/speiger/src/collections/ints/base/BaseIntListTest.java index 0cd4bf97..6d3053d9 100644 --- a/src/test/java/speiger/src/collections/ints/base/BaseIntListTest.java +++ b/src/test/java/speiger/src/collections/ints/base/BaseIntListTest.java @@ -12,6 +12,7 @@ import speiger.src.collections.ints.lists.IntListIterator; import speiger.src.collections.ints.utils.IntCollections; import speiger.src.collections.tests.ListTest; +@SuppressWarnings("javadoc") public abstract class BaseIntListTest extends BaseIntCollectionTest { @Override diff --git a/src/test/java/speiger/src/collections/ints/base/BaseIntNavigableSetTest.java b/src/test/java/speiger/src/collections/ints/base/BaseIntNavigableSetTest.java index 5c4adf86..8de313cb 100644 --- a/src/test/java/speiger/src/collections/ints/base/BaseIntNavigableSetTest.java +++ b/src/test/java/speiger/src/collections/ints/base/BaseIntNavigableSetTest.java @@ -8,6 +8,7 @@ import org.junit.Test; import speiger.src.collections.ints.sets.IntNavigableSet; import speiger.src.collections.tests.NavigableSetTest; +@SuppressWarnings("javadoc") public abstract class BaseIntNavigableSetTest extends BaseIntSortedSetTest { @Override diff --git a/src/test/java/speiger/src/collections/ints/base/BaseIntPriorityQueueTest.java b/src/test/java/speiger/src/collections/ints/base/BaseIntPriorityQueueTest.java index c8e7d291..e0062c45 100644 --- a/src/test/java/speiger/src/collections/ints/base/BaseIntPriorityQueueTest.java +++ b/src/test/java/speiger/src/collections/ints/base/BaseIntPriorityQueueTest.java @@ -11,6 +11,7 @@ import speiger.src.collections.ints.utils.IntArrays; import speiger.src.collections.tests.IterableTest; import speiger.src.collections.tests.PriorityQueueTest; +@SuppressWarnings("javadoc") public abstract class BaseIntPriorityQueueTest extends BaseIntIterableTest { @Override diff --git a/src/test/java/speiger/src/collections/ints/base/BaseIntSortedSetTest.java b/src/test/java/speiger/src/collections/ints/base/BaseIntSortedSetTest.java index 87bd132c..f970827c 100644 --- a/src/test/java/speiger/src/collections/ints/base/BaseIntSortedSetTest.java +++ b/src/test/java/speiger/src/collections/ints/base/BaseIntSortedSetTest.java @@ -8,6 +8,7 @@ import org.junit.Test; import speiger.src.collections.ints.sets.IntSortedSet; import speiger.src.collections.tests.SortedSetTest; +@SuppressWarnings("javadoc") public abstract class BaseIntSortedSetTest extends BaseIntCollectionTest { @Override diff --git a/src/test/java/speiger/src/collections/ints/base/IIntArrayTest.java b/src/test/java/speiger/src/collections/ints/base/IIntArrayTest.java index ee07d2ca..256d9862 100644 --- a/src/test/java/speiger/src/collections/ints/base/IIntArrayTest.java +++ b/src/test/java/speiger/src/collections/ints/base/IIntArrayTest.java @@ -7,6 +7,7 @@ import org.junit.Test; import speiger.src.collections.ints.utils.IIntArray; +@SuppressWarnings("javadoc") public interface IIntArrayTest { static final int[] TEST_ARRAY = IntStream.range(0, 100).toArray(); diff --git a/src/test/java/speiger/src/collections/ints/base/IIntStackTests.java b/src/test/java/speiger/src/collections/ints/base/IIntStackTests.java index 3141d3bd..93d860cf 100644 --- a/src/test/java/speiger/src/collections/ints/base/IIntStackTests.java +++ b/src/test/java/speiger/src/collections/ints/base/IIntStackTests.java @@ -7,6 +7,7 @@ import org.junit.Test; import speiger.src.collections.ints.collections.IntStack; +@SuppressWarnings("javadoc") public interface IIntStackTests { static final int[] TEST_ARRAY = IntStream.range(0, 100).toArray(); diff --git a/src/test/java/speiger/src/collections/ints/lists/IntArrayListTest.java b/src/test/java/speiger/src/collections/ints/lists/IntArrayListTest.java index d200295d..bc957d8b 100644 --- a/src/test/java/speiger/src/collections/ints/lists/IntArrayListTest.java +++ b/src/test/java/speiger/src/collections/ints/lists/IntArrayListTest.java @@ -6,6 +6,7 @@ import speiger.src.collections.ints.base.BaseIntListTest; import speiger.src.collections.ints.base.IIntArrayTest; import speiger.src.collections.ints.base.IIntStackTests; +@SuppressWarnings("javadoc") public class IntArrayListTest extends BaseIntListTest implements IIntStackTests, IIntArrayTest { @Override diff --git a/src/test/java/speiger/src/collections/ints/maps/Int2IntAVLTreeMapTest.java b/src/test/java/speiger/src/collections/ints/maps/Int2IntAVLTreeMapTest.java index c9a2df42..35de4c25 100644 --- a/src/test/java/speiger/src/collections/ints/maps/Int2IntAVLTreeMapTest.java +++ b/src/test/java/speiger/src/collections/ints/maps/Int2IntAVLTreeMapTest.java @@ -7,6 +7,7 @@ import speiger.src.collections.ints.maps.impl.tree.Int2IntAVLTreeMap; import speiger.src.collections.ints.maps.interfaces.Int2IntNavigableMap; import speiger.src.collections.tests.SortedMapTests; +@SuppressWarnings("javadoc") public class Int2IntAVLTreeMapTest extends BaseInt2IntNavigableMapTest { @Override diff --git a/src/test/java/speiger/src/collections/ints/maps/Int2IntArrayMapTest.java b/src/test/java/speiger/src/collections/ints/maps/Int2IntArrayMapTest.java index 7a05e291..a281bc64 100644 --- a/src/test/java/speiger/src/collections/ints/maps/Int2IntArrayMapTest.java +++ b/src/test/java/speiger/src/collections/ints/maps/Int2IntArrayMapTest.java @@ -4,6 +4,7 @@ import speiger.src.collections.ints.base.BaseInt2IntSortedMapTest; import speiger.src.collections.ints.maps.impl.misc.Int2IntArrayMap; import speiger.src.collections.ints.maps.interfaces.Int2IntSortedMap; +@SuppressWarnings("javadoc") public class Int2IntArrayMapTest extends BaseInt2IntSortedMapTest { @Override diff --git a/src/test/java/speiger/src/collections/ints/maps/Int2IntCustomHashMapTest.java b/src/test/java/speiger/src/collections/ints/maps/Int2IntCustomHashMapTest.java index 92a5a9cf..3f4f0831 100644 --- a/src/test/java/speiger/src/collections/ints/maps/Int2IntCustomHashMapTest.java +++ b/src/test/java/speiger/src/collections/ints/maps/Int2IntCustomHashMapTest.java @@ -4,6 +4,7 @@ import speiger.src.collections.ints.base.BaseInt2IntMapTest; import speiger.src.collections.ints.maps.impl.customHash.Int2IntOpenCustomHashMap; import speiger.src.collections.ints.maps.interfaces.Int2IntMap; +@SuppressWarnings("javadoc") public class Int2IntCustomHashMapTest extends BaseInt2IntMapTest { @Override diff --git a/src/test/java/speiger/src/collections/ints/maps/Int2IntHashMapTest.java b/src/test/java/speiger/src/collections/ints/maps/Int2IntHashMapTest.java index 65b16779..45d4d058 100644 --- a/src/test/java/speiger/src/collections/ints/maps/Int2IntHashMapTest.java +++ b/src/test/java/speiger/src/collections/ints/maps/Int2IntHashMapTest.java @@ -4,6 +4,7 @@ import speiger.src.collections.ints.base.BaseInt2IntMapTest; import speiger.src.collections.ints.maps.impl.hash.Int2IntOpenHashMap; import speiger.src.collections.ints.maps.interfaces.Int2IntMap; +@SuppressWarnings("javadoc") public class Int2IntHashMapTest extends BaseInt2IntMapTest { diff --git a/src/test/java/speiger/src/collections/ints/maps/Int2IntLinkedOpenCustomHashMapTest.java b/src/test/java/speiger/src/collections/ints/maps/Int2IntLinkedOpenCustomHashMapTest.java index 2fa4c4d1..53668bc6 100644 --- a/src/test/java/speiger/src/collections/ints/maps/Int2IntLinkedOpenCustomHashMapTest.java +++ b/src/test/java/speiger/src/collections/ints/maps/Int2IntLinkedOpenCustomHashMapTest.java @@ -7,6 +7,7 @@ import speiger.src.collections.ints.maps.impl.customHash.Int2IntLinkedOpenCustom import speiger.src.collections.ints.maps.interfaces.Int2IntSortedMap; import speiger.src.collections.tests.SortedMapTests; +@SuppressWarnings("javadoc") public class Int2IntLinkedOpenCustomHashMapTest extends BaseInt2IntSortedMapTest { @Override diff --git a/src/test/java/speiger/src/collections/ints/maps/Int2IntLinkedOpenHashMapTest.java b/src/test/java/speiger/src/collections/ints/maps/Int2IntLinkedOpenHashMapTest.java index 3a8e7499..22a32c12 100644 --- a/src/test/java/speiger/src/collections/ints/maps/Int2IntLinkedOpenHashMapTest.java +++ b/src/test/java/speiger/src/collections/ints/maps/Int2IntLinkedOpenHashMapTest.java @@ -7,6 +7,7 @@ import speiger.src.collections.ints.maps.impl.hash.Int2IntLinkedOpenHashMap; import speiger.src.collections.ints.maps.interfaces.Int2IntSortedMap; import speiger.src.collections.tests.SortedMapTests; +@SuppressWarnings("javadoc") public class Int2IntLinkedOpenHashMapTest extends BaseInt2IntSortedMapTest { @Override diff --git a/src/test/java/speiger/src/collections/ints/maps/Int2IntRBTreeMapTest.java b/src/test/java/speiger/src/collections/ints/maps/Int2IntRBTreeMapTest.java index 22c45c07..3a0fe198 100644 --- a/src/test/java/speiger/src/collections/ints/maps/Int2IntRBTreeMapTest.java +++ b/src/test/java/speiger/src/collections/ints/maps/Int2IntRBTreeMapTest.java @@ -7,6 +7,7 @@ import speiger.src.collections.ints.maps.impl.tree.Int2IntRBTreeMap; import speiger.src.collections.ints.maps.interfaces.Int2IntNavigableMap; import speiger.src.collections.tests.SortedMapTests; +@SuppressWarnings("javadoc") public class Int2IntRBTreeMapTest extends BaseInt2IntNavigableMapTest { @Override diff --git a/src/test/java/speiger/src/collections/ints/queues/IntArrayFIFOQueueTests.java b/src/test/java/speiger/src/collections/ints/queues/IntArrayFIFOQueueTests.java index d9c7b89e..62cf8fd6 100644 --- a/src/test/java/speiger/src/collections/ints/queues/IntArrayFIFOQueueTests.java +++ b/src/test/java/speiger/src/collections/ints/queues/IntArrayFIFOQueueTests.java @@ -2,6 +2,7 @@ package speiger.src.collections.ints.queues; import speiger.src.collections.ints.base.BaseIntPriorityQueueTest; +@SuppressWarnings("javadoc") public class IntArrayFIFOQueueTests extends BaseIntPriorityQueueTest { @Override diff --git a/src/test/java/speiger/src/collections/ints/queues/IntArrayPriorityQueueTests.java b/src/test/java/speiger/src/collections/ints/queues/IntArrayPriorityQueueTests.java index e6d8855f..d5e21624 100644 --- a/src/test/java/speiger/src/collections/ints/queues/IntArrayPriorityQueueTests.java +++ b/src/test/java/speiger/src/collections/ints/queues/IntArrayPriorityQueueTests.java @@ -2,6 +2,7 @@ package speiger.src.collections.ints.queues; import speiger.src.collections.ints.base.BaseIntPriorityQueueTest; +@SuppressWarnings("javadoc") public class IntArrayPriorityQueueTests extends BaseIntPriorityQueueTest { @Override diff --git a/src/test/java/speiger/src/collections/ints/queues/IntHeapPriorityQueueTests.java b/src/test/java/speiger/src/collections/ints/queues/IntHeapPriorityQueueTests.java index efeea750..7d2d85d9 100644 --- a/src/test/java/speiger/src/collections/ints/queues/IntHeapPriorityQueueTests.java +++ b/src/test/java/speiger/src/collections/ints/queues/IntHeapPriorityQueueTests.java @@ -2,6 +2,7 @@ package speiger.src.collections.ints.queues; import speiger.src.collections.ints.base.BaseIntPriorityQueueTest; +@SuppressWarnings("javadoc") public class IntHeapPriorityQueueTests extends BaseIntPriorityQueueTest { @Override diff --git a/src/test/java/speiger/src/collections/ints/sets/IntAVLTreeSetTests.java b/src/test/java/speiger/src/collections/ints/sets/IntAVLTreeSetTests.java index 6c2da68b..8dc3ca09 100644 --- a/src/test/java/speiger/src/collections/ints/sets/IntAVLTreeSetTests.java +++ b/src/test/java/speiger/src/collections/ints/sets/IntAVLTreeSetTests.java @@ -5,6 +5,7 @@ import java.util.EnumSet; import speiger.src.collections.ints.base.BaseIntNavigableSetTest; import speiger.src.collections.tests.SortedSetTest; +@SuppressWarnings("javadoc") public class IntAVLTreeSetTests extends BaseIntNavigableSetTest { @Override diff --git a/src/test/java/speiger/src/collections/ints/sets/IntArraySetTests.java b/src/test/java/speiger/src/collections/ints/sets/IntArraySetTests.java index 05ba680e..c7fc570d 100644 --- a/src/test/java/speiger/src/collections/ints/sets/IntArraySetTests.java +++ b/src/test/java/speiger/src/collections/ints/sets/IntArraySetTests.java @@ -2,6 +2,7 @@ package speiger.src.collections.ints.sets; import speiger.src.collections.ints.base.BaseIntSortedSetTest; +@SuppressWarnings("javadoc") public class IntArraySetTests extends BaseIntSortedSetTest { @Override diff --git a/src/test/java/speiger/src/collections/ints/sets/IntHashSetTests.java b/src/test/java/speiger/src/collections/ints/sets/IntHashSetTests.java index 276286da..940af4dc 100644 --- a/src/test/java/speiger/src/collections/ints/sets/IntHashSetTests.java +++ b/src/test/java/speiger/src/collections/ints/sets/IntHashSetTests.java @@ -8,6 +8,7 @@ import speiger.src.collections.ints.collections.IntCollection; import speiger.src.collections.ints.utils.IntStrategy; import speiger.src.collections.tests.SortedSetTest; +@SuppressWarnings("javadoc") public class IntHashSetTests { public static abstract class BaseIntOpenHashSetTests extends BaseIntSortedSetTest diff --git a/src/test/java/speiger/src/collections/ints/sets/IntRBTreeSetTests.java b/src/test/java/speiger/src/collections/ints/sets/IntRBTreeSetTests.java index 038f3593..44706587 100644 --- a/src/test/java/speiger/src/collections/ints/sets/IntRBTreeSetTests.java +++ b/src/test/java/speiger/src/collections/ints/sets/IntRBTreeSetTests.java @@ -5,6 +5,7 @@ import java.util.EnumSet; import speiger.src.collections.ints.base.BaseIntNavigableSetTest; import speiger.src.collections.tests.SortedSetTest; +@SuppressWarnings("javadoc") public class IntRBTreeSetTests extends BaseIntNavigableSetTest { diff --git a/src/test/java/speiger/src/collections/ints/utils/SortingTests.java b/src/test/java/speiger/src/collections/ints/utils/SortingTests.java index bd1991d4..6b272124 100644 --- a/src/test/java/speiger/src/collections/ints/utils/SortingTests.java +++ b/src/test/java/speiger/src/collections/ints/utils/SortingTests.java @@ -6,6 +6,7 @@ import java.util.stream.IntStream; import org.junit.Assert; import org.junit.Test; +@SuppressWarnings("javadoc") public class SortingTests { public static final int[] SMALL_TEST = IntStream.range(0, 5000).toArray(); diff --git a/src/test/java/speiger/src/collections/tests/CollectionTest.java b/src/test/java/speiger/src/collections/tests/CollectionTest.java index e81e52a4..93065090 100644 --- a/src/test/java/speiger/src/collections/tests/CollectionTest.java +++ b/src/test/java/speiger/src/collections/tests/CollectionTest.java @@ -1,5 +1,6 @@ package speiger.src.collections.tests; +@SuppressWarnings("javadoc") public enum CollectionTest { ADD, diff --git a/src/test/java/speiger/src/collections/tests/IterableTest.java b/src/test/java/speiger/src/collections/tests/IterableTest.java index 99d03ade..b4d19a10 100644 --- a/src/test/java/speiger/src/collections/tests/IterableTest.java +++ b/src/test/java/speiger/src/collections/tests/IterableTest.java @@ -1,5 +1,6 @@ package speiger.src.collections.tests; +@SuppressWarnings("javadoc") public enum IterableTest { FOR_EACH, diff --git a/src/test/java/speiger/src/collections/tests/ListTest.java b/src/test/java/speiger/src/collections/tests/ListTest.java index c283c1ee..76c01f37 100644 --- a/src/test/java/speiger/src/collections/tests/ListTest.java +++ b/src/test/java/speiger/src/collections/tests/ListTest.java @@ -1,5 +1,6 @@ package speiger.src.collections.tests; +@SuppressWarnings("javadoc") public enum ListTest { ADD_INDEX, diff --git a/src/test/java/speiger/src/collections/tests/MapTests.java b/src/test/java/speiger/src/collections/tests/MapTests.java index a29daf4b..ca397e4d 100644 --- a/src/test/java/speiger/src/collections/tests/MapTests.java +++ b/src/test/java/speiger/src/collections/tests/MapTests.java @@ -1,5 +1,6 @@ package speiger.src.collections.tests; +@SuppressWarnings("javadoc") public enum MapTests { PUT, diff --git a/src/test/java/speiger/src/collections/tests/NavigableMapTests.java b/src/test/java/speiger/src/collections/tests/NavigableMapTests.java index a2f7aa81..5e33b0a0 100644 --- a/src/test/java/speiger/src/collections/tests/NavigableMapTests.java +++ b/src/test/java/speiger/src/collections/tests/NavigableMapTests.java @@ -1,5 +1,6 @@ package speiger.src.collections.tests; +@SuppressWarnings("javadoc") public enum NavigableMapTests { DESENDING, diff --git a/src/test/java/speiger/src/collections/tests/NavigableSetTest.java b/src/test/java/speiger/src/collections/tests/NavigableSetTest.java index 9d9d69e3..d463a819 100644 --- a/src/test/java/speiger/src/collections/tests/NavigableSetTest.java +++ b/src/test/java/speiger/src/collections/tests/NavigableSetTest.java @@ -1,5 +1,6 @@ package speiger.src.collections.tests; +@SuppressWarnings("javadoc") public enum NavigableSetTest { DESENDING, diff --git a/src/test/java/speiger/src/collections/tests/PriorityQueueTest.java b/src/test/java/speiger/src/collections/tests/PriorityQueueTest.java index 755d1801..db894828 100644 --- a/src/test/java/speiger/src/collections/tests/PriorityQueueTest.java +++ b/src/test/java/speiger/src/collections/tests/PriorityQueueTest.java @@ -1,5 +1,6 @@ package speiger.src.collections.tests; +@SuppressWarnings("javadoc") public enum PriorityQueueTest { IN_OUT, diff --git a/src/test/java/speiger/src/collections/tests/SortedMapTests.java b/src/test/java/speiger/src/collections/tests/SortedMapTests.java index e558f34b..4ee717dd 100644 --- a/src/test/java/speiger/src/collections/tests/SortedMapTests.java +++ b/src/test/java/speiger/src/collections/tests/SortedMapTests.java @@ -1,5 +1,6 @@ package speiger.src.collections.tests; +@SuppressWarnings("javadoc") public enum SortedMapTests { PUT_MOVE, diff --git a/src/test/java/speiger/src/collections/tests/SortedSetTest.java b/src/test/java/speiger/src/collections/tests/SortedSetTest.java index 6eaeb7da..22ee615e 100644 --- a/src/test/java/speiger/src/collections/tests/SortedSetTest.java +++ b/src/test/java/speiger/src/collections/tests/SortedSetTest.java @@ -1,5 +1,6 @@ package speiger.src.collections.tests; +@SuppressWarnings("javadoc") public enum SortedSetTest { ADD_MOVE,