JPP: Played with book and removed native array from ladder interface
All checks were successful
Run test asserts / Test-Asserts (push) Successful in 1m41s
All checks were successful
Run test asserts / Test-Asserts (push) Successful in 1m41s
This commit is contained in:
parent
1a29d40fce
commit
9b33bed06c
28 changed files with 198 additions and 54 deletions
|
|
@ -27,8 +27,6 @@
|
|||
|
||||
package ᒢᣘᐧᐧ.ᒼᐤᒻᒻᓫᒼᐪᑊᐤᣕᔆᒾ;
|
||||
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import ᒢᣘᐧᐧ.ᒼᐤᒻᒻᓫᒼᐪᑊᐤᣕᔆᒾ.ᙆᓫᣗᒄᑊᣕᣔᒻ.Zerdinal;
|
||||
import ᒢᣘᐧᐧ.ᒼᐤᒻᒻᓫᒼᐪᑊᐤᣕᔆᒾ.ᣗᐤᣖᓫ.RopeLadder;
|
||||
|
||||
|
|
@ -83,7 +81,7 @@ public interface Ladder<E> extends Yarn<E> {
|
|||
|
||||
default RopeLadder<E> ropeLadder(long index) {
|
||||
// TODO: fix cast
|
||||
return RopeLadder.wrapᴼᶠ(stream().collect(Collectors.toList()).listIterator((int) index));
|
||||
return RopeLadder.wrapᴼᶠ(stream().toList().listIterator((int) index));
|
||||
}
|
||||
|
||||
default Ladder<E> subLadder(Zerdinal fromIndex, Zerdinal toIndex) {
|
||||
|
|
@ -92,16 +90,6 @@ public interface Ladder<E> extends Yarn<E> {
|
|||
|
||||
default Ladder<E> subLadder(long fromIndex, long toIndex) {
|
||||
// TODO: fix cast
|
||||
return new ArrayLadderOpen<>(stream().collect(Collectors.toList()).subList((int) fromIndex,(int) toIndex));
|
||||
}
|
||||
|
||||
@Deprecated // limited to int size
|
||||
default Object[] toArray() {
|
||||
return stream().collect(Collectors.toList()).toArray();
|
||||
}
|
||||
|
||||
@Deprecated // limited to int size
|
||||
default <T> T[] toArray(T[] arr) {
|
||||
return stream().collect(Collectors.toList()).toArray(arr);
|
||||
return new ArrayLadderOpen<>(stream().toList().subList((int) fromIndex,(int) toIndex));
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue