diff --git a/src/builder/resources/speiger/assets/collections/templates/functions/Comparator.template b/src/builder/resources/speiger/assets/collections/templates/functions/Comparator.template index 124c030b..870ec5f5 100644 --- a/src/builder/resources/speiger/assets/collections/templates/functions/Comparator.template +++ b/src/builder/resources/speiger/assets/collections/templates/functions/Comparator.template @@ -50,6 +50,10 @@ public interface COMPARATOR extends Comparator { COMPARATOR original; + /** + * default constructor + * @param original that is going to be reversed + */ public Reversed(COMPARATOR original) { this.original = original; } diff --git a/src/builder/resources/speiger/assets/collections/templates/lists/ArrayList.template b/src/builder/resources/speiger/assets/collections/templates/lists/ArrayList.template index 366bed17..9d8aa8c6 100644 --- a/src/builder/resources/speiger/assets/collections/templates/lists/ArrayList.template +++ b/src/builder/resources/speiger/assets/collections/templates/lists/ArrayList.template @@ -193,7 +193,7 @@ public class ARRAY_LIST KEY_GENERIC_TYPE extends ABSTRACT_LIST KEY_GENERIC_TYPE * Appends the specified element to the end of this list. * * @param e element to be appended to this list - * @return true (as specified by {@link Collection#add}) + * @return true (as specified by {@link Collection#add}) */ @Override public boolean add(KEY_TYPE e) { 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 eb07cce4..a720ad38 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 @@ -227,6 +227,11 @@ public interface SORTED_MAP KEY_VALUE_GENERIC_TYPE extends SortedMap { @Override public ObjectBidirectionalIterator 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 fastIterator(KEY_TYPE fromElement); } } \ No newline at end of file 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 e29bf9c4..946d1e5e 100644 --- a/src/test/java/speiger/src/collections/ints/base/BaseIntIterableTest.java +++ b/src/test/java/speiger/src/collections/ints/base/BaseIntIterableTest.java @@ -123,8 +123,8 @@ public abstract class BaseIntIterableTest @Test public void testStreamMap() { if(getValidIterableTests().contains(IterableTest.STREAM_MAP)) { - Integer[] expected = IntStream.of(TEST_ARRAY).mapToObj(Integer::new).toArray(Integer[]::new); - Integer[] actual = ObjectIterators.pour(create(TEST_ARRAY).map(Integer::new).iterator()).toArray(Integer[]::new); + Integer[] expected = IntStream.of(TEST_ARRAY).mapToObj(Integer::valueOf).toArray(Integer[]::new); + Integer[] actual = ObjectIterators.pour(create(TEST_ARRAY).map(Integer::valueOf).iterator()).toArray(Integer[]::new); ObjectArrays.stableSort(actual); Assert.assertArrayEquals(expected, actual); }