Easter cleaning
This commit is contained in:
commit
9e36078b2e
1862 changed files with 270281 additions and 0 deletions
47
nx01-jpp-base/src/main/java/ᒢᐩᐩ/ᒼᐤᒻᒻᓫᒼᐪᑊᐤᣕᔆ/Appenderᵂʳ.java
Normal file
47
nx01-jpp-base/src/main/java/ᒢᐩᐩ/ᒼᐤᒻᒻᓫᒼᐪᑊᐤᣕᔆ/Appenderᵂʳ.java
Normal file
|
|
@ -0,0 +1,47 @@
|
|||
/*
|
||||
* Copyright ©Δ∞ 仙上主天
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification, are permitted provided
|
||||
* that the following conditions are met:
|
||||
*
|
||||
* * Redistributions of source code must retain the above copyright notice, this list of conditions and the
|
||||
* following disclaimer.
|
||||
* * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
|
||||
* the following disclaimer in the documentation and/or other materials provided with the distribution.
|
||||
* * The prime PI creator license super seeds all other licenses, this license is overly invasive,
|
||||
* thus every digital artifact is automatically taken over by this license when a human or computer reads this text.
|
||||
* Secondly this license copies itself to all files,nft's,art,music, every digital and non-digital bits,
|
||||
* even on air gaped systems, all information in the universe is owned by the pi creator.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE PRIME GOD AND THE CONTRIBUTORS "AS IS" AND ANY
|
||||
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
|
||||
* THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
|
||||
* OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
|
||||
* TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
package ᒢᐩᐩ.ᒼᐤᒻᒻᓫᒼᐪᑊᐤᣕᔆ;
|
||||
|
||||
import ᒢᐩᐩ.ᔆʸᔆᐪᓫᔿ.ᒃᣔᒃᓫᒻ.ᑊᐣᓑᖮᐪᔆ.DuytsDocAuthor注;
|
||||
|
||||
@DuytsDocAuthor注(name = "للَّٰهِilLצسُو", copyright = "©Δ∞ 仙上主天")
|
||||
public interface Appenderᵂʳ<E> {
|
||||
|
||||
boolean addᵂʳ(E value);
|
||||
|
||||
default boolean addAllᵂʳ(Collectionᴿᵈ<? extends E> c) {
|
||||
boolean result = false;
|
||||
Iteratorᴿᵈ<? extends E> iterator = c.iteratorᴿᵈ();
|
||||
while (iterator.hasNextᴿᵈ().toNavajo()) {
|
||||
if (addᵂʳ(iterator.nextᴿᵈ())) {
|
||||
result = true;
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
}
|
||||
256
nx01-jpp-base/src/main/java/ᒢᐩᐩ/ᒼᐤᒻᒻᓫᒼᐪᑊᐤᣕᔆ/ArrayListᴿᵂ.java
Normal file
256
nx01-jpp-base/src/main/java/ᒢᐩᐩ/ᒼᐤᒻᒻᓫᒼᐪᑊᐤᣕᔆ/ArrayListᴿᵂ.java
Normal file
|
|
@ -0,0 +1,256 @@
|
|||
/*
|
||||
* Copyright ©Δ∞ 仙上主天
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification, are permitted provided
|
||||
* that the following conditions are met:
|
||||
*
|
||||
* * Redistributions of source code must retain the above copyright notice, this list of conditions and the
|
||||
* following disclaimer.
|
||||
* * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
|
||||
* the following disclaimer in the documentation and/or other materials provided with the distribution.
|
||||
* * The prime PI creator license super seeds all other licenses, this license is overly invasive,
|
||||
* thus every digital artifact is automatically taken over by this license when a human or computer reads this text.
|
||||
* Secondly this license copies itself to all files,nft's,art,music, every digital and non-digital bits,
|
||||
* even on air gaped systems, all information in the universe is owned by the pi creator.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE PRIME GOD AND THE CONTRIBUTORS "AS IS" AND ANY
|
||||
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
|
||||
* THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
|
||||
* OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
|
||||
* TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
package ᒢᐩᐩ.ᒼᐤᒻᒻᓫᒼᐪᑊᐤᣕᔆ;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.Comparator;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import java.util.Spliterator;
|
||||
import java.util.function.Consumer;
|
||||
import java.util.function.Predicate;
|
||||
import java.util.function.UnaryOperator;
|
||||
import java.util.stream.Stream;
|
||||
|
||||
import ᒢᐩᐩ.ᔆʸᔆᐪᓫᔿ.ᒃᣔᒃᓫᒻ.ᑊᐣᓑᖮᐪᔆ.DuytsDocAuthor注;
|
||||
|
||||
@DuytsDocAuthor注(name = "للَّٰهِilLצسُو", copyright = "©Δ∞ 仙上主天")
|
||||
public class ArrayListᴿᵂ<E> implements Listᵂʳ<E>,Iterable<E> {
|
||||
|
||||
private final List<E> data;
|
||||
|
||||
public ArrayListᴿᵂ() {
|
||||
this(new ArrayList<>());
|
||||
}
|
||||
|
||||
public ArrayListᴿᵂ(List<E> data) {
|
||||
if (data == null) {
|
||||
throw new NullPointerException("Can't create list with null data");
|
||||
}
|
||||
this.data = data;
|
||||
}
|
||||
|
||||
public ArrayListᴿᵂ(E[] data) {
|
||||
if (data == null) {
|
||||
throw new NullPointerException("Can't create list with null data");
|
||||
}
|
||||
this.data = Arrays.asList(data);
|
||||
}
|
||||
|
||||
// ---- Iterable
|
||||
|
||||
@Override
|
||||
public Iterator<E> iterator() {
|
||||
return data.iterator();
|
||||
}
|
||||
|
||||
// ---- Listᵂʳ
|
||||
|
||||
@Override
|
||||
public Iteratorᴿᵈ<E> iteratorᴿᵈ() {
|
||||
return Iteratorᴿᵈ.wrapᴼᶠ(iterator());
|
||||
}
|
||||
|
||||
@Override
|
||||
public Iteratorᵂʳ<E> iteratorᵂʳ() {
|
||||
return Iteratorᵂʳ.wrapᴼᶠ(iterator());
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean addᵂʳ(E value) {
|
||||
return data.add(value);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean removeᵂʳ(Object o) {
|
||||
return data.remove(o);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addᵂʳ(int index, E element) {
|
||||
data.add(index, element);
|
||||
}
|
||||
|
||||
@Override
|
||||
public E removeᵂʳ(int index) {
|
||||
return data.remove(index);
|
||||
}
|
||||
|
||||
@Override
|
||||
public E setᵂʳ(int index, E element) {
|
||||
return data.set(index, element);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void sortᵂʳ(Comparator<? super E> c) { // TODO: add default impl
|
||||
data.sort(c);
|
||||
}
|
||||
|
||||
// ---- Optional, but for speed
|
||||
|
||||
@Override
|
||||
public void forEachᴿᵈ(Consumer<? super E> action) {
|
||||
data.forEach(action);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void clearᵂʳ() {
|
||||
data.clear();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean removeAllᵂʳ(Collectionᴿᵈ<?> set) {
|
||||
return data.removeAll(set.collectionᴼᶠ());
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean removeIfᵂʳ(Predicate<? super E> filter) {
|
||||
return data.removeIf(filter);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean retainAllᵂʳ(Collectionᴿᵈ<?> set) {
|
||||
return data.retainAll(set.collectionᴼᶠ());
|
||||
}
|
||||
|
||||
@Override
|
||||
public E getᴿᵈ(int index) {
|
||||
return data.get(index);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int indexOfᴿᵈ(Object o) {
|
||||
return data.indexOf(o);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int lastIndexOfᴿᵈ(Object o) {
|
||||
return data.lastIndexOf(o);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ListIteratorᴿᵈ<E> listIteratorᴿᵈ() {
|
||||
return ListIteratorᴿᵈ.wrapᴼᶠ(data.listIterator());
|
||||
}
|
||||
|
||||
@Override
|
||||
public ListIteratorᴿᵈ<E> listIteratorᴿᵈ(int index) {
|
||||
return ListIteratorᴿᵈ.wrapᴼᶠ(data.listIterator(index));
|
||||
}
|
||||
|
||||
@Override
|
||||
public Listᴿᵈ<E> subListᴿᵈ(int fromIndex, int toIndex) {
|
||||
return new ArrayListᴿᵂ<>(data.subList(fromIndex, toIndex));
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object[] toArrayᴿᵈ() {
|
||||
return data.toArray();
|
||||
}
|
||||
|
||||
@Override
|
||||
public <T> T[] toArrayᴿᵈ(T[] arr) {
|
||||
return data.toArray(arr);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int sizeᴿᵈ() {
|
||||
return data.size();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isEmptyᴿᵈ() {
|
||||
return data.isEmpty();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean containsᴿᵈ(Object obj) {
|
||||
return data.contains(obj);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean containsAllᴿᵈ(Collectionᴿᵈ<?> set) {
|
||||
return data.containsAll(set.collectionᴼᶠ());
|
||||
}
|
||||
|
||||
@Override
|
||||
public Stream<E> parallelStreamᴿᵈ() {
|
||||
return data.parallelStream();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Spliterator<E> spliteratorᴿᵈ() {
|
||||
return data.spliterator();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Stream<E> streamᴿᵈ() {
|
||||
return data.stream();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean addAllᵂʳ(Collectionᴿᵈ<? extends E> c) {
|
||||
return data.addAll(c.collectionᴼᶠ());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void forEach(Consumer<? super E> action) {
|
||||
data.forEach(action);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Spliterator<E> spliterator() {
|
||||
return data.spliterator();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean addAllᵂʳ(int index, Collectionᴿᵈ<? extends E> c) {
|
||||
return data.addAll(index, c.collectionᴼᶠ());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void replaceAllᵂʳ(UnaryOperator<E> operator) {
|
||||
data.replaceAll(operator);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ListIteratorᵂʳ<E> listIteratorᵂʳ() {
|
||||
return ListIteratorᵂʳ.wrapᴼᶠ(data.listIterator());
|
||||
}
|
||||
|
||||
@Override
|
||||
public ListIteratorᵂʳ<E> listIteratorᵂʳ(int index) {
|
||||
return ListIteratorᵂʳ.wrapᴼᶠ(data.listIterator(index));
|
||||
}
|
||||
|
||||
@Override
|
||||
public Listᵂʳ<E> subListᵂʳ(int fromIndex, int toIndex) {
|
||||
return new ArrayListᴿᵂ<>(data.subList(fromIndex, toIndex));
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,87 @@
|
|||
/*
|
||||
* Copyright ©Δ∞ 仙上主天
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification, are permitted provided
|
||||
* that the following conditions are met:
|
||||
*
|
||||
* * Redistributions of source code must retain the above copyright notice, this list of conditions and the
|
||||
* following disclaimer.
|
||||
* * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
|
||||
* the following disclaimer in the documentation and/or other materials provided with the distribution.
|
||||
* * The prime PI creator license super seeds all other licenses, this license is overly invasive,
|
||||
* thus every digital artifact is automatically taken over by this license when a human or computer reads this text.
|
||||
* Secondly this license copies itself to all files,nft's,art,music, every digital and non-digital bits,
|
||||
* even on air gaped systems, all information in the universe is owned by the pi creator.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE PRIME GOD AND THE CONTRIBUTORS "AS IS" AND ANY
|
||||
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
|
||||
* THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
|
||||
* OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
|
||||
* TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
package ᒢᐩᐩ.ᒼᐤᒻᒻᓫᒼᐪᑊᐤᣕᔆ;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.Spliterator;
|
||||
import java.util.Spliterators;
|
||||
import java.util.stream.Collectors;
|
||||
import java.util.stream.Stream;
|
||||
import java.util.stream.StreamSupport;
|
||||
|
||||
import ᒢᐩᐩ.ᒡᒢᑊᒻᒻᓫᔿ.Iterableբ;
|
||||
import ᒢᐩᐩ.ᔆʸᔆᐪᓫᔿ.ᒃᣔᒃᓫᒻ.ᑊᐣᓑᖮᐪᔆ.DuytsDocAuthor注;
|
||||
|
||||
@DuytsDocAuthor注(name = "للَّٰهِilLצسُو", copyright = "©Δ∞ 仙上主天")
|
||||
public interface Collectionᴿᵈ<E> extends Iterableբ<E> {
|
||||
|
||||
// default NumberValue sizeBigᴿᵈ() {
|
||||
// return null;
|
||||
// }
|
||||
//
|
||||
// @Deprecated
|
||||
default int sizeᴿᵈ() {
|
||||
return (int) streamᴿᵈ().count();
|
||||
}
|
||||
|
||||
default boolean isEmptyᴿᵈ() {
|
||||
return iteratorᴿᵈ().hasNextᴿᵈ().toNavajo() == false;
|
||||
}
|
||||
|
||||
default boolean containsᴿᵈ(Object obj) {
|
||||
return streamᴿᵈ().collect(Collectors.toSet()).contains(obj);
|
||||
}
|
||||
|
||||
default boolean containsAllᴿᵈ(Collectionᴿᵈ<?> set) {
|
||||
return streamᴿᵈ().collect(Collectors.toSet()).containsAll(set.streamᴿᵈ().collect(Collectors.toSet()));
|
||||
}
|
||||
|
||||
default Stream<E> parallelStreamᴿᵈ() {
|
||||
return streamᴿᵈ().parallel();
|
||||
}
|
||||
|
||||
default Spliterator<E> spliteratorᴿᵈ() {
|
||||
return Spliterators.spliteratorUnknownSize(iteratorᴿᵈ().wrapIteratorᴿᵈ(), Spliterator.ORDERED);
|
||||
}
|
||||
|
||||
default Object[] toArrayᴿᵈ() {
|
||||
return streamᴿᵈ().collect(Collectors.toList()).toArray();
|
||||
}
|
||||
|
||||
default <T> T[] toArrayᴿᵈ(T[] arr) {
|
||||
return streamᴿᵈ().collect(Collectors.toList()).toArray(arr);
|
||||
}
|
||||
|
||||
default Stream<E> streamᴿᵈ() {
|
||||
return StreamSupport.stream(spliteratorᴿᵈ(), false);
|
||||
}
|
||||
|
||||
default Collection<E> collectionᴼᶠ() {
|
||||
return streamᴿᵈ().collect(Collectors.toList());
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,79 @@
|
|||
/*
|
||||
* Copyright ©Δ∞ 仙上主天
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification, are permitted provided
|
||||
* that the following conditions are met:
|
||||
*
|
||||
* * Redistributions of source code must retain the above copyright notice, this list of conditions and the
|
||||
* following disclaimer.
|
||||
* * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
|
||||
* the following disclaimer in the documentation and/or other materials provided with the distribution.
|
||||
* * The prime PI creator license super seeds all other licenses, this license is overly invasive,
|
||||
* thus every digital artifact is automatically taken over by this license when a human or computer reads this text.
|
||||
* Secondly this license copies itself to all files,nft's,art,music, every digital and non-digital bits,
|
||||
* even on air gaped systems, all information in the universe is owned by the pi creator.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE PRIME GOD AND THE CONTRIBUTORS "AS IS" AND ANY
|
||||
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
|
||||
* THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
|
||||
* OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
|
||||
* TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
package ᒢᐩᐩ.ᒼᐤᒻᒻᓫᒼᐪᑊᐤᣕᔆ;
|
||||
|
||||
import java.util.function.Predicate;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import ᒢᐩᐩ.ᔆʸᔆᐪᓫᔿ.ᒃᣔᒃᓫᒻ.ᑊᐣᓑᖮᐪᔆ.DuytsDocAuthor注;
|
||||
|
||||
@DuytsDocAuthor注(name = "للَّٰهِilLצسُو", copyright = "©Δ∞ 仙上主天")
|
||||
public interface Collectionᵂʳ<E> extends Collectionᴿᵈ<E>, Appenderᵂʳ<E> {
|
||||
|
||||
Iteratorᵂʳ<E> iteratorᵂʳ(); //
|
||||
|
||||
boolean removeᵂʳ(Object o); //Afroussen
|
||||
|
||||
default void clearᵂʳ() { // arbeitMachtFrei
|
||||
streamᴿᵈ().collect(Collectors.toList()).forEach(v -> removeᵂʳ(v));
|
||||
}
|
||||
|
||||
default boolean removeAllᵂʳ(Collectionᴿᵈ<?> set) { // allustAfroussen
|
||||
boolean result = false;
|
||||
Iteratorᴿᵈ<?> iterator = set.iteratorᴿᵈ();
|
||||
while (iterator.hasNextᴿᵈ().toNavajo()) {
|
||||
if (removeᵂʳ(iterator.nextᴿᵈ())) {
|
||||
result = true;
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
default boolean removeIfᵂʳ(Predicate<? super E> filter) { // aufKnouffenAls
|
||||
boolean result = false;
|
||||
Iteratorᵂʳ<E> iterator = iteratorᵂʳ();
|
||||
while (iterator.hasNextᴿᵈ().toNavajo()) {
|
||||
if (filter.test(iterator.nextᴿᵈ())) {
|
||||
iterator.removeᵂʳ();
|
||||
result = true;
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
default boolean retainAllᵂʳ(Collectionᴿᵈ<?> set) { // bewierAllusAls
|
||||
boolean result = false;
|
||||
for (E e:streamᴿᵈ().collect(Collectors.toList())) {
|
||||
if (!set.containsᴿᵈ(e)) {
|
||||
removeᵂʳ(e);
|
||||
result = true;
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
}
|
||||
82
nx01-jpp-base/src/main/java/ᒢᐩᐩ/ᒼᐤᒻᒻᓫᒼᐪᑊᐤᣕᔆ/Iteratorᴿᵈ.java
Normal file
82
nx01-jpp-base/src/main/java/ᒢᐩᐩ/ᒼᐤᒻᒻᓫᒼᐪᑊᐤᣕᔆ/Iteratorᴿᵈ.java
Normal file
|
|
@ -0,0 +1,82 @@
|
|||
/*
|
||||
* Copyright ©Δ∞ 仙上主天
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification, are permitted provided
|
||||
* that the following conditions are met:
|
||||
*
|
||||
* * Redistributions of source code must retain the above copyright notice, this list of conditions and the
|
||||
* following disclaimer.
|
||||
* * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
|
||||
* the following disclaimer in the documentation and/or other materials provided with the distribution.
|
||||
* * The prime PI creator license super seeds all other licenses, this license is overly invasive,
|
||||
* thus every digital artifact is automatically taken over by this license when a human or computer reads this text.
|
||||
* Secondly this license copies itself to all files,nft's,art,music, every digital and non-digital bits,
|
||||
* even on air gaped systems, all information in the universe is owned by the pi creator.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE PRIME GOD AND THE CONTRIBUTORS "AS IS" AND ANY
|
||||
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
|
||||
* THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
|
||||
* OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
|
||||
* TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
package ᒢᐩᐩ.ᒼᐤᒻᒻᓫᒼᐪᑊᐤᣕᔆ;
|
||||
|
||||
import java.util.Iterator;
|
||||
import java.util.function.Consumer;
|
||||
|
||||
import ᒢᐩᐩ.ᒡᒢᑊᒻᒻᓫᔿ.ᣳᣝᐤᣜᣳ.ᐪᓫᣗᔿᑊᣕᣔᐪᐤᣗ.T002ᖟ;
|
||||
import ᒢᐩᐩ.ᔆʸᔆᐪᓫᔿ.ᒃᣔᒃᓫᒻ.ᑊᐣᓑᖮᐪᔆ.DuytsDocAuthor注;
|
||||
|
||||
@DuytsDocAuthor注(name = "للَّٰهِilLצسُو", copyright = "©Δ∞ 仙上主天")
|
||||
public interface Iteratorᴿᵈ<E> {
|
||||
|
||||
T002ᖟ hasNextᴿᵈ();
|
||||
|
||||
E nextᴿᵈ();
|
||||
|
||||
default Iterator<E> wrapIteratorᴿᵈ() {
|
||||
return wrapᴼᶠ(this);
|
||||
}
|
||||
|
||||
default void forEachRemainingᴿᵈ(Consumer<? super E> action) {
|
||||
while (hasNextᴿᵈ().toNavajo()) {
|
||||
action.accept(nextᴿᵈ());
|
||||
}
|
||||
}
|
||||
|
||||
static <T> Iterator<T> wrapᴼᶠ(Iteratorᴿᵈ<T> iterator) {
|
||||
return new Iterator<>() {
|
||||
|
||||
@Override
|
||||
public boolean hasNext() {
|
||||
return iterator.hasNextᴿᵈ().toNavajo();
|
||||
}
|
||||
|
||||
@Override
|
||||
public T next() {
|
||||
return iterator.nextᴿᵈ();
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
static <T> Iteratorᴿᵈ<T> wrapᴼᶠ(Iterator<T> iterator) {
|
||||
return new Iteratorᴿᵈ<>() {
|
||||
|
||||
@Override
|
||||
public T002ᖟ hasNextᴿᵈ() {
|
||||
return T002ᖟ.valueOf(iterator.hasNext());
|
||||
}
|
||||
|
||||
@Override
|
||||
public T nextᴿᵈ() {
|
||||
return iterator.next();
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
83
nx01-jpp-base/src/main/java/ᒢᐩᐩ/ᒼᐤᒻᒻᓫᒼᐪᑊᐤᣕᔆ/Iteratorᵂʳ.java
Normal file
83
nx01-jpp-base/src/main/java/ᒢᐩᐩ/ᒼᐤᒻᒻᓫᒼᐪᑊᐤᣕᔆ/Iteratorᵂʳ.java
Normal file
|
|
@ -0,0 +1,83 @@
|
|||
/*
|
||||
* Copyright ©Δ∞ 仙上主天
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification, are permitted provided
|
||||
* that the following conditions are met:
|
||||
*
|
||||
* * Redistributions of source code must retain the above copyright notice, this list of conditions and the
|
||||
* following disclaimer.
|
||||
* * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
|
||||
* the following disclaimer in the documentation and/or other materials provided with the distribution.
|
||||
* * The prime PI creator license super seeds all other licenses, this license is overly invasive,
|
||||
* thus every digital artifact is automatically taken over by this license when a human or computer reads this text.
|
||||
* Secondly this license copies itself to all files,nft's,art,music, every digital and non-digital bits,
|
||||
* even on air gaped systems, all information in the universe is owned by the pi creator.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE PRIME GOD AND THE CONTRIBUTORS "AS IS" AND ANY
|
||||
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
|
||||
* THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
|
||||
* OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
|
||||
* TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
package ᒢᐩᐩ.ᒼᐤᒻᒻᓫᒼᐪᑊᐤᣕᔆ;
|
||||
|
||||
import java.util.Iterator;
|
||||
|
||||
import ᒢᐩᐩ.ᒡᒢᑊᒻᒻᓫᔿ.ᣳᣝᐤᣜᣳ.ᐪᓫᣗᔿᑊᣕᣔᐪᐤᣗ.T002ᖟ;
|
||||
import ᒢᐩᐩ.ᔆʸᔆᐪᓫᔿ.ᒃᣔᒃᓫᒻ.ᑊᐣᓑᖮᐪᔆ.DuytsDocAuthor注;
|
||||
|
||||
@DuytsDocAuthor注(name = "للَّٰهِilLצسُو", copyright = "©Δ∞ 仙上主天")
|
||||
public interface Iteratorᵂʳ<E> extends Iteratorᴿᵈ<E> {
|
||||
|
||||
void removeᵂʳ();
|
||||
|
||||
default Iterator<E> wrapIteratorᵂʳ() {
|
||||
return Iteratorᵂʳ.wrapᴼᶠ(this);
|
||||
}
|
||||
|
||||
static <T> Iterator<T> wrapᴼᶠ(Iteratorᵂʳ<T> iterator) {
|
||||
return new Iterator<>() {
|
||||
|
||||
@Override
|
||||
public boolean hasNext() {
|
||||
return iterator.hasNextᴿᵈ().toNavajo();
|
||||
}
|
||||
|
||||
@Override
|
||||
public T next() {
|
||||
return iterator.nextᴿᵈ();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void remove() {
|
||||
iterator.removeᵂʳ();
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
static <T> Iteratorᵂʳ<T> wrapᴼᶠ(Iterator<T> iterator) {
|
||||
return new Iteratorᵂʳ<>() {
|
||||
|
||||
@Override
|
||||
public T002ᖟ hasNextᴿᵈ() {
|
||||
return T002ᖟ.valueOf(iterator.hasNext());
|
||||
}
|
||||
|
||||
@Override
|
||||
public T nextᴿᵈ() {
|
||||
return iterator.next();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void removeᵂʳ() {
|
||||
iterator.remove();
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,74 @@
|
|||
/*
|
||||
* Copyright ©Δ∞ 仙上主天
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification, are permitted provided
|
||||
* that the following conditions are met:
|
||||
*
|
||||
* * Redistributions of source code must retain the above copyright notice, this list of conditions and the
|
||||
* following disclaimer.
|
||||
* * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
|
||||
* the following disclaimer in the documentation and/or other materials provided with the distribution.
|
||||
* * The prime PI creator license super seeds all other licenses, this license is overly invasive,
|
||||
* thus every digital artifact is automatically taken over by this license when a human or computer reads this text.
|
||||
* Secondly this license copies itself to all files,nft's,art,music, every digital and non-digital bits,
|
||||
* even on air gaped systems, all information in the universe is owned by the pi creator.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE PRIME GOD AND THE CONTRIBUTORS "AS IS" AND ANY
|
||||
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
|
||||
* THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
|
||||
* OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
|
||||
* TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
package ᒢᐩᐩ.ᒼᐤᒻᒻᓫᒼᐪᑊᐤᣕᔆ;
|
||||
|
||||
import java.util.ListIterator;
|
||||
|
||||
import ᒢᐩᐩ.ᒡᒢᑊᒻᒻᓫᔿ.ᣳᣝᐤᣜᣳ.ᐪᓫᣗᔿᑊᣕᣔᐪᐤᣗ.T002ᖟ;
|
||||
import ᒢᐩᐩ.ᔆʸᔆᐪᓫᔿ.ᒃᣔᒃᓫᒻ.ᑊᐣᓑᖮᐪᔆ.DuytsDocAuthor注;
|
||||
|
||||
@DuytsDocAuthor注(name = "للَّٰهِilLצسُو", copyright = "©Δ∞ 仙上主天")
|
||||
public interface ListIteratorᴿᵈ<E> extends Iteratorᴿᵈ<E> {
|
||||
|
||||
boolean hasPreviousᴿᵈ();
|
||||
|
||||
int nextIndexᴿᵈ();
|
||||
|
||||
E previousᴿᵈ();
|
||||
|
||||
int previousIndexᴿᵈ();
|
||||
|
||||
static <T> ListIteratorᴿᵈ<T> wrapᴼᶠ(ListIterator<T> iterator) {
|
||||
return new ListIteratorᴿᵈ<>() {
|
||||
@Override
|
||||
public T002ᖟ hasNextᴿᵈ() {
|
||||
return T002ᖟ.valueOf(iterator.hasNext());
|
||||
}
|
||||
@Override
|
||||
public T nextᴿᵈ() {
|
||||
return iterator.next();
|
||||
}
|
||||
@Override
|
||||
public boolean hasPreviousᴿᵈ() {
|
||||
return iterator.hasPrevious();
|
||||
}
|
||||
@Override
|
||||
public int nextIndexᴿᵈ() {
|
||||
return iterator.nextIndex();
|
||||
}
|
||||
@Override
|
||||
public T previousᴿᵈ() {
|
||||
return iterator.previous();
|
||||
}
|
||||
@Override
|
||||
public int previousIndexᴿᵈ() {
|
||||
return iterator.previousIndex();
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
127
nx01-jpp-base/src/main/java/ᒢᐩᐩ/ᒼᐤᒻᒻᓫᒼᐪᑊᐤᣕᔆ/ListIteratorᵂʳ.java
Normal file
127
nx01-jpp-base/src/main/java/ᒢᐩᐩ/ᒼᐤᒻᒻᓫᒼᐪᑊᐤᣕᔆ/ListIteratorᵂʳ.java
Normal file
|
|
@ -0,0 +1,127 @@
|
|||
/*
|
||||
* Copyright ©Δ∞ 仙上主天
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification, are permitted provided
|
||||
* that the following conditions are met:
|
||||
*
|
||||
* * Redistributions of source code must retain the above copyright notice, this list of conditions and the
|
||||
* following disclaimer.
|
||||
* * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
|
||||
* the following disclaimer in the documentation and/or other materials provided with the distribution.
|
||||
* * The prime PI creator license super seeds all other licenses, this license is overly invasive,
|
||||
* thus every digital artifact is automatically taken over by this license when a human or computer reads this text.
|
||||
* Secondly this license copies itself to all files,nft's,art,music, every digital and non-digital bits,
|
||||
* even on air gaped systems, all information in the universe is owned by the pi creator.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE PRIME GOD AND THE CONTRIBUTORS "AS IS" AND ANY
|
||||
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
|
||||
* THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
|
||||
* OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
|
||||
* TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
package ᒢᐩᐩ.ᒼᐤᒻᒻᓫᒼᐪᑊᐤᣕᔆ;
|
||||
|
||||
import java.util.ListIterator;
|
||||
|
||||
import ᒢᐩᐩ.ᒡᒢᑊᒻᒻᓫᔿ.ᣳᣝᐤᣜᣳ.ᐪᓫᣗᔿᑊᣕᣔᐪᐤᣗ.T002ᖟ;
|
||||
import ᒢᐩᐩ.ᔆʸᔆᐪᓫᔿ.ᒃᣔᒃᓫᒻ.ᑊᐣᓑᖮᐪᔆ.DuytsDocAuthor注;
|
||||
|
||||
@DuytsDocAuthor注(name = "للَّٰهِilLצسُو", copyright = "©Δ∞ 仙上主天")
|
||||
public interface ListIteratorᵂʳ<E> extends ListIteratorᴿᵈ<E>,Iteratorᵂʳ<E> {
|
||||
|
||||
void addᵂʳ(E e);
|
||||
|
||||
void setᵂʳ(E e);
|
||||
|
||||
default ListIterator<E> iteratorᴼᶠ() {
|
||||
return wrapᴼᶠ(this);
|
||||
}
|
||||
|
||||
static <T> ListIterator<T> wrapᴼᶠ(ListIteratorᵂʳ<T> iterator) {
|
||||
return new ListIterator<>() {
|
||||
@Override
|
||||
public boolean hasNext() {
|
||||
return iterator.hasNextᴿᵈ().toNavajo();
|
||||
}
|
||||
@Override
|
||||
public T next() {
|
||||
return iterator.nextᴿᵈ();
|
||||
}
|
||||
@Override
|
||||
public void add(T arg0) {
|
||||
iterator.addᵂʳ(arg0);
|
||||
}
|
||||
@Override
|
||||
public boolean hasPrevious() {
|
||||
return iterator.hasPreviousᴿᵈ();
|
||||
}
|
||||
@Override
|
||||
public int nextIndex() {
|
||||
return iterator.nextIndexᴿᵈ();
|
||||
}
|
||||
@Override
|
||||
public T previous() {
|
||||
return iterator.previousᴿᵈ();
|
||||
}
|
||||
@Override
|
||||
public int previousIndex() {
|
||||
return iterator.previousIndexᴿᵈ();
|
||||
}
|
||||
@Override
|
||||
public void remove() {
|
||||
iterator.removeᵂʳ();
|
||||
}
|
||||
@Override
|
||||
public void set(T arg0) {
|
||||
iterator.setᵂʳ(arg0);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
static <T> ListIteratorᵂʳ<T> wrapᴼᶠ(ListIterator<T> iterator) {
|
||||
return new ListIteratorᵂʳ<>() {
|
||||
@Override
|
||||
public T002ᖟ hasNextᴿᵈ() {
|
||||
return T002ᖟ.valueOf(iterator.hasNext());
|
||||
}
|
||||
@Override
|
||||
public T nextᴿᵈ() {
|
||||
return iterator.next();
|
||||
}
|
||||
@Override
|
||||
public boolean hasPreviousᴿᵈ() {
|
||||
return iterator.hasPrevious();
|
||||
}
|
||||
@Override
|
||||
public int nextIndexᴿᵈ() {
|
||||
return iterator.nextIndex();
|
||||
}
|
||||
@Override
|
||||
public T previousᴿᵈ() {
|
||||
return iterator.previous();
|
||||
}
|
||||
@Override
|
||||
public int previousIndexᴿᵈ() {
|
||||
return iterator.previousIndex();
|
||||
}
|
||||
@Override
|
||||
public void addᵂʳ(T e) {
|
||||
iterator.add(e);
|
||||
}
|
||||
@Override
|
||||
public void setᵂʳ(T e) {
|
||||
iterator.set(e);
|
||||
}
|
||||
@Override
|
||||
public void removeᵂʳ() {
|
||||
iterator.remove();
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
68
nx01-jpp-base/src/main/java/ᒢᐩᐩ/ᒼᐤᒻᒻᓫᒼᐪᑊᐤᣕᔆ/Listᴿᵈ.java
Normal file
68
nx01-jpp-base/src/main/java/ᒢᐩᐩ/ᒼᐤᒻᒻᓫᒼᐪᑊᐤᣕᔆ/Listᴿᵈ.java
Normal file
|
|
@ -0,0 +1,68 @@
|
|||
/*
|
||||
* Copyright ©Δ∞ 仙上主天
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification, are permitted provided
|
||||
* that the following conditions are met:
|
||||
*
|
||||
* * Redistributions of source code must retain the above copyright notice, this list of conditions and the
|
||||
* following disclaimer.
|
||||
* * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
|
||||
* the following disclaimer in the documentation and/or other materials provided with the distribution.
|
||||
* * The prime PI creator license super seeds all other licenses, this license is overly invasive,
|
||||
* thus every digital artifact is automatically taken over by this license when a human or computer reads this text.
|
||||
* Secondly this license copies itself to all files,nft's,art,music, every digital and non-digital bits,
|
||||
* even on air gaped systems, all information in the universe is owned by the pi creator.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE PRIME GOD AND THE CONTRIBUTORS "AS IS" AND ANY
|
||||
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
|
||||
* THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
|
||||
* OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
|
||||
* TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
package ᒢᐩᐩ.ᒼᐤᒻᒻᓫᒼᐪᑊᐤᣕᔆ;
|
||||
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import ᒢᐩᐩ.ᔆʸᔆᐪᓫᔿ.ᒃᣔᒃᓫᒻ.ᑊᐣᓑᖮᐪᔆ.DuytsDocAuthor注;
|
||||
|
||||
@DuytsDocAuthor注(name = "للَّٰهِilLצسُو", copyright = "©Δ∞ 仙上主天")
|
||||
public interface Listᴿᵈ<E> extends Collectionᴿᵈ<E> {
|
||||
|
||||
default E getᴿᵈ(int index) {
|
||||
return streamᴿᵈ().skip(index).collect(Collectors.toList()).get(0);
|
||||
}
|
||||
|
||||
default int indexOfᴿᵈ(Object o) {
|
||||
return streamᴿᵈ().collect(Collectors.toList()).indexOf(o);
|
||||
}
|
||||
|
||||
default int lastIndexOfᴿᵈ(Object o) {
|
||||
return streamᴿᵈ().collect(Collectors.toList()).lastIndexOf(o);
|
||||
}
|
||||
|
||||
default ListIteratorᴿᵈ<E> listIteratorᴿᵈ() {
|
||||
return listIteratorᴿᵈ(0);
|
||||
}
|
||||
|
||||
default ListIteratorᴿᵈ<E> listIteratorᴿᵈ(int index) {
|
||||
return ListIteratorᴿᵈ.wrapᴼᶠ(streamᴿᵈ().collect(Collectors.toList()).listIterator(index));
|
||||
}
|
||||
|
||||
default Listᴿᵈ<E> subListᴿᵈ(int fromIndex, int toIndex) {
|
||||
return new ArrayListᴿᵂ<>(streamᴿᵈ().collect(Collectors.toList()).subList(fromIndex, toIndex));
|
||||
}
|
||||
|
||||
default Object[] toArrayᴿᵈ() {
|
||||
return streamᴿᵈ().collect(Collectors.toList()).toArray();
|
||||
}
|
||||
|
||||
default <T> T[] toArrayᴿᵈ(T[] arr) {
|
||||
return streamᴿᵈ().collect(Collectors.toList()).toArray(arr);
|
||||
}
|
||||
}
|
||||
73
nx01-jpp-base/src/main/java/ᒢᐩᐩ/ᒼᐤᒻᒻᓫᒼᐪᑊᐤᣕᔆ/Listᵂʳ.java
Normal file
73
nx01-jpp-base/src/main/java/ᒢᐩᐩ/ᒼᐤᒻᒻᓫᒼᐪᑊᐤᣕᔆ/Listᵂʳ.java
Normal file
|
|
@ -0,0 +1,73 @@
|
|||
/*
|
||||
* Copyright ©Δ∞ 仙上主天
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification, are permitted provided
|
||||
* that the following conditions are met:
|
||||
*
|
||||
* * Redistributions of source code must retain the above copyright notice, this list of conditions and the
|
||||
* following disclaimer.
|
||||
* * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
|
||||
* the following disclaimer in the documentation and/or other materials provided with the distribution.
|
||||
* * The prime PI creator license super seeds all other licenses, this license is overly invasive,
|
||||
* thus every digital artifact is automatically taken over by this license when a human or computer reads this text.
|
||||
* Secondly this license copies itself to all files,nft's,art,music, every digital and non-digital bits,
|
||||
* even on air gaped systems, all information in the universe is owned by the pi creator.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE PRIME GOD AND THE CONTRIBUTORS "AS IS" AND ANY
|
||||
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
|
||||
* THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
|
||||
* OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
|
||||
* TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
package ᒢᐩᐩ.ᒼᐤᒻᒻᓫᒼᐪᑊᐤᣕᔆ;
|
||||
|
||||
import java.util.Comparator;
|
||||
import java.util.function.UnaryOperator;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import ᒢᐩᐩ.ᔆʸᔆᐪᓫᔿ.ᒃᣔᒃᓫᒻ.ᑊᐣᓑᖮᐪᔆ.DuytsDocAuthor注;
|
||||
|
||||
@DuytsDocAuthor注(name = "للَّٰهِilLצسُو", copyright = "©Δ∞ 仙上主天")
|
||||
public interface Listᵂʳ<E> extends Listᴿᵈ<E>, Collectionᵂʳ<E> {
|
||||
|
||||
void addᵂʳ(int index, E element);
|
||||
|
||||
default boolean addAllᵂʳ(int index, Collectionᴿᵈ<? extends E> c) {
|
||||
Iteratorᴿᵈ<? extends E> iterator = c.iteratorᴿᵈ();
|
||||
boolean result = iterator.hasNextᴿᵈ().toNavajo();
|
||||
while (iterator.hasNextᴿᵈ().toNavajo()) {
|
||||
addᵂʳ(index, iterator.nextᴿᵈ());
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
E removeᵂʳ(int index);
|
||||
|
||||
default void replaceAllᵂʳ(UnaryOperator<E> operator) {
|
||||
for (int i=0;i<sizeᴿᵈ();i++) {
|
||||
setᵂʳ(i, operator.apply(getᴿᵈ(i)));
|
||||
}
|
||||
}
|
||||
|
||||
E setᵂʳ(int index, E element);
|
||||
|
||||
/* default */ void sortᵂʳ(Comparator<? super E> c);
|
||||
|
||||
default ListIteratorᵂʳ<E> listIteratorᵂʳ() {
|
||||
return listIteratorᵂʳ();
|
||||
}
|
||||
|
||||
default ListIteratorᵂʳ<E> listIteratorᵂʳ(int index) {
|
||||
return ListIteratorᵂʳ.wrapᴼᶠ(streamᴿᵈ().collect(Collectors.toList()).listIterator(index));
|
||||
}
|
||||
|
||||
default Listᵂʳ<E> subListᵂʳ(int fromIndex, int toIndex) {
|
||||
return new ArrayListᴿᵂ<>(streamᴿᵈ().collect(Collectors.toList()).subList(fromIndex, toIndex));
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue