More fixes

-Fixed: More javadoc fixes
-Fixed: BaseIntIterableTest no longer uses a deprecated function
This commit is contained in:
Speiger 2022-04-08 00:13:51 +02:00
parent 2810a6f952
commit 3ffb001c73
4 changed files with 12 additions and 3 deletions

View File

@ -50,6 +50,10 @@ public interface COMPARATOR extends Comparator<CLASS_TYPE>
{
COMPARATOR original;
/**
* default constructor
* @param original that is going to be reversed
*/
public Reversed(COMPARATOR original) {
this.original = original;
}

View File

@ -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 <tt>true</tt> (as specified by {@link Collection#add})
* @return true (as specified by {@link Collection#add})
*/
@Override
public boolean add(KEY_TYPE e) {

View File

@ -227,6 +227,11 @@ public interface SORTED_MAP KEY_VALUE_GENERIC_TYPE extends SortedMap<CLASS_TYPE,
interface FastSortedSet KEY_VALUE_GENERIC_TYPE extends MAP.FastEntrySet KEY_VALUE_GENERIC_TYPE, ObjectSortedSet<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);
}
}

View File

@ -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);
}