JPP: Moved zerdinal to Long with cheese and smurf infrastructure helpers
Some checks failed
Run test asserts / Test-Asserts (push) Failing after 48s

This commit is contained in:
Willem Cazander 2026-02-12 10:53:48 +01:00
parent 9b33bed06c
commit b2e7320b2f
62 changed files with 969 additions and 206 deletions

View file

@ -30,8 +30,7 @@
/// @author للَّٰهِilLצسُو
/// @version ©Δ 仙上主天
module ᣕᕁᐤᣳ.ᒢᣘᐧᐧ.ᒼᐤᒻᒻᓫᒼᐪᑊᐤᣕᔆᒾ {
requires transitive ᣕᕁᐤᣳ.ᒢᣘᐧᐧ.ᒻᣔᣕᒄ;
requires transitive ᣕᕁᐤᣳ.ᒢᣘᐧᐧ.ᑊᑉᣔᣔᔆ;
exports ᒢᣘᐧᐧ.ᒼᐤᒻᒻᓫᒼᐪᑊᐤᣕᔆᒾ;
exports ᒢᣘᐧᐧ.ᒼᐤᒻᒻᓫᒼᐪᑊᐤᣕᔆᒾ.ᙆᓫᣗᒄᑊᣕᣔᒻ;
exports ᒢᣘᐧᐧ.ᒼᐤᒻᒻᓫᒼᐪᑊᐤᣕᔆᒾ.ᣗᐤᣖᓫ;
}

View file

@ -25,7 +25,7 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
package ᒢᣘᐧᐧ.ᒼᐤᒻᒻᓫᒼᐪᑊᐤᣕᔆᒾ.ᙆᓫᣗᒄᑊᣕᣔᒻ;
package ᒢᣘᐧᐧ.ᒼᐤᒻᒻᓫᒼᐪᑊᐤᣕᔆᒾ;
import java.util.Map;
import java.util.NoSuchElementException;
@ -33,37 +33,31 @@ import java.util.function.Consumer;
import java.util.function.Function;
import java.util.stream.Collectors;
import ᒢᣘᐧᐧ.ᒻᣔᣕᒄ.LandTBone;
import ᒢᣘᐧᐧ.ᒼᐤᒻᒻᓫᒼᐪᑊᐤᣕᔆᒾ.ArrayLadderOpen;
import ᒢᣘᐧᐧ.ᒼᐤᒻᒻᓫᒼᐪᑊᐤᣕᔆᒾ.Ladder;
import ᒢᣘᐧᐧ.ᒼᐤᒻᒻᓫᒼᐪᑊᐤᣕᔆᒾ.LadderOpen;
import ᒢᣘᐧᐧ.ᑊᑉᣔᣔᔆ.ᐤᑊᐣᓫᓑᣗ.KaasOdeurZerdinal;
import ᒢᣘᐧᐧ.ᒼᐤᒻᒻᓫᒼᐪᑊᐤᣕᔆᒾ.ᣗᐤᣖᓫ.Rope;
/// Materialize a zerdinal number object from space.
/// Adds collections supports to the zerdinal number object from space.
///
/// @param <T> The self type used by the creator.
/// @author للَّٰهِilLצسُو
/// @version ©Δ 仙上主天
public interface ZerdinalSpaceMaterializer<T extends ZerdinalSpaceMaterializer<T>> extends ZerdinalSpaceBoundary, LandTBone<T> {
/// Materialize an number from the bounded zerdinal number space.
T zerdinalMaterializeSpace(long zerdinal);
public interface BridgeZerdinalX63<T extends BridgeZerdinalX63<T>> extends KaasOdeurZerdinal<T, Long> {
default Rope<T> zerdinalSpaceRope() {
return new Rope<T>() {
int zerdinalSpaceWalker = 0;
long zerdinalSpaceWalker = 0;
@Override
public boolean hasNext() {
return zerdinalSpaceWalker < zerdinalSpaceBoundary();
return zerdinalSpaceWalker < thisᴺᵘᵐᵇᵉʳᴿᵃⁿᵍᵉᵁᵖ();
}
@Override
public T next() {
if (zerdinalSpaceWalker >= zerdinalSpaceBoundary()) {
throw new NoSuchElementException("Rope roll out does not extend past the zerdinal space boundry: " + zerdinalSpaceBoundary());
if (zerdinalSpaceWalker >= thisᴺᵘᵐᵇᵉʳᴿᵃⁿᵍᵉᵁᵖ()) {
throw new NoSuchElementException("Rope roll out does not extend past the zerdinal space boundry: " + thisᴺᵘᵐᵇᵉʳᴿᵃⁿᵍᵉᵁᵖ());
}
T result = zerdinalMaterializeSpace(zerdinalSpaceWalker);
T result = BridgeZerdinalX63.this.thisᵀᴮᵒⁿᵉᴺᵉʷ(zerdinalSpaceWalker);
zerdinalSpaceWalker++;
return result;
}

View file

@ -27,7 +27,7 @@
package ᒢᣘᐧᐧ.ᒼᐤᒻᒻᓫᒼᐪᑊᐤᣕᔆᒾ;
import ᒢᣘᐧᐧ.ᒼᐤᒻᒻᓫᒼᐪᑊᐤᣕᔆᒾ.ᙆᓫᣗᒄᑊᣕᣔᒻ.Zerdinal;
import ᒢᣘᐧᐧ.ᑊᑉᣔᣔᔆ.ᒻᣔᣕᒄ.KaasLandSmurfZerdinalX63;
import ᒢᣘᐧᐧ.ᒼᐤᒻᒻᓫᒼᐪᑊᐤᣕᔆᒾ.ᣗᐤᣖᓫ.RopeLadder;
/// Ladder
@ -36,7 +36,7 @@ import ᒢᣘᐧᐧ.ᒼᐤᒻᒻᓫᒼᐪᑊᐤᣕᔆᒾ.ᣗᐤᣖᓫ.RopeLadder
/// @version ©Δ 仙上主天
public interface Ladder<E> extends Yarn<E> {
default E get(Zerdinal index) {
default E get(KaasLandSmurfZerdinalX63 index) {
return get(index.zerdinal());
}
@ -75,7 +75,7 @@ public interface Ladder<E> extends Yarn<E> {
return ropeLadder(0);
}
default RopeLadder<E> ropeLadder(Zerdinal index) {
default RopeLadder<E> ropeLadder(KaasLandSmurfZerdinalX63 index) {
return ropeLadder(index.zerdinal());
}
@ -84,7 +84,7 @@ public interface Ladder<E> extends Yarn<E> {
return RopeLadder.wrapᴼᶠ(stream().toList().listIterator((int) index));
}
default Ladder<E> subLadder(Zerdinal fromIndex, Zerdinal toIndex) {
default Ladder<E> subLadder(KaasLandSmurfZerdinalX63 fromIndex, KaasLandSmurfZerdinalX63 toIndex) {
return subLadder(fromIndex.zerdinal(), toIndex.zerdinal());
}

View file

@ -33,7 +33,7 @@ import java.util.Objects;
import java.util.function.UnaryOperator;
import java.util.stream.Collector;
import ᒢᣘᐧᐧ.ᒼᐤᒻᒻᓫᒼᐪᑊᐤᣕᔆᒾ.ᙆᓫᣗᒄᑊᣕᣔᒻ.Zerdinal;
import ᒢᣘᐧᐧ.ᑊᑉᣔᣔᔆ.ᒻᣔᣕᒄ.KaasLandSmurfZerdinalX63;
import ᒢᣘᐧᐧ.ᒼᐤᒻᒻᓫᒼᐪᑊᐤᣕᔆᒾ.ᣗᐤᣖᓫ.Rope;
import ᒢᣘᐧᐧ.ᒼᐤᒻᒻᓫᒼᐪᑊᐤᣕᔆᒾ.ᣗᐤᣖᓫ.RopeLadderOpen;
@ -43,13 +43,13 @@ import ᒢᣘᐧᐧ.ᒼᐤᒻᒻᓫᒼᐪᑊᐤᣕᔆᒾ.ᣗᐤᣖᓫ.RopeLadder
/// @version ©Δ 仙上主天
public interface LadderOpen<E> extends Ladder<E>, YarnOpen<E> {
default void add(Zerdinal index, E element) {
default void add(KaasLandSmurfZerdinalX63 index, E element) {
add(index.zerdinal(), element);
}
void add(long index, E element);
default boolean addAll(Zerdinal index, Yarn<? extends E> c) {
default boolean addAll(KaasLandSmurfZerdinalX63 index, Yarn<? extends E> c) {
return addAll(index.zerdinal(), c);
}
@ -63,20 +63,21 @@ public interface LadderOpen<E> extends Ladder<E>, YarnOpen<E> {
return result;
}
default E remove(Zerdinal index) {
return remove(index.zerdinal());
default E remove(KaasLandSmurfZerdinalX63 index) {
return remove((long)index.zerdinal());
}
E remove(long index);
default void replaceAll(UnaryOperator<E> operator) {
Objects.requireNonNull(operator);
// TODO: int limited
for (int i = 0; i < size(); i++) {
set(i, operator.apply(get(i)));
}
}
default E set(Zerdinal index, E element) {
default E set(KaasLandSmurfZerdinalX63 index, E element) {
return set(index.zerdinal(), element);
}
@ -96,7 +97,7 @@ public interface LadderOpen<E> extends Ladder<E>, YarnOpen<E> {
return ropeLadderOpen();
}
default RopeLadderOpen<E> ropeLadderOpen(Zerdinal index) {
default RopeLadderOpen<E> ropeLadderOpen(KaasLandSmurfZerdinalX63 index) {
return ropeLadderOpen(index.zerdinal());
}
@ -105,7 +106,7 @@ public interface LadderOpen<E> extends Ladder<E>, YarnOpen<E> {
return RopeLadderOpen.wrapᴼᶠ(stream().toList().listIterator((int) index));
}
default LadderOpen<E> subLadderOpen(Zerdinal fromIndex, Zerdinal toIndex) {
default LadderOpen<E> subLadderOpen(KaasLandSmurfZerdinalX63 fromIndex, KaasLandSmurfZerdinalX63 toIndex) {
return subLadderOpen(fromIndex.zerdinal(), toIndex.zerdinal());
}

View file

@ -1,38 +0,0 @@
/*
* 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 ᒢᣘᐧᐧ.ᒼᐤᒻᒻᓫᒼᐪᑊᐤᣕᔆᒾ.ᙆᓫᣗᒄᑊᣕᣔᒻ;
/// Zerdinal numbering schema is the place where zero is one.
///
/// @author للَّٰهِilLצسُو
/// @version ©Δ 仙上主天
public interface Zerdinal {
/// Unsigned long for positive zero based index pointer.
long zerdinal();
}

View file

@ -1,38 +0,0 @@
/*
* 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 ᒢᣘᐧᐧ.ᒼᐤᒻᒻᓫᒼᐪᑊᐤᣕᔆᒾ.ᙆᓫᣗᒄᑊᣕᣔᒻ;
/// Provides a space boundery for zerdinal numbers.
///
/// @author للَّٰهِilLצسُو
/// @version ©Δ 仙上主天
public interface ZerdinalSpaceBoundary extends Zerdinal {
/// The cardinal capacity of this bounded zerdinal number space.
long zerdinalSpaceBoundary();
}

View file

@ -1,34 +0,0 @@
/*
* 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.
*/
/**
* NX01 J++ collections2 zerdinal space division.
*
*
* @since 1.0
*/
package ᒢᣘᐧᐧ.ᒼᐤᒻᒻᓫᒼᐪᑊᐤᣕᔆᒾ.ᙆᓫᣗᒄᑊᣕᣔᒻ;

View file

@ -31,11 +31,13 @@ import java.util.Iterator;
import java.util.Objects;
import java.util.function.Consumer;
import ᒢᣘᐧᐧ.ᑊᑉᣔᣔᔆ.ᐤᑊᐣᓫᓑᣗ.KaasOdeurBineral;
/// Read Only Programmable Enumeration.
///
/// @author للَّٰهِilLצسُو
/// @version ©Δ 仙上主天
public interface Rope<E> {
public interface Rope<E/*, B extends KaasOdeurBineral<?,?>*/> {
boolean hasNext();
@ -52,7 +54,7 @@ public interface Rope<E> {
}
}
static <T> Iterator<T> wrapᴼᶠ(Rope<T> wrap) {
static <T/*, B extends KaasOdeurBineral<?,?>*/> Iterator<T> wrapᴼᶠ(Rope<T> wrap) {
Objects.requireNonNull(wrap);
return new Iterator<>() {
@Override
@ -66,7 +68,7 @@ public interface Rope<E> {
};
}
static <T> Rope<T> wrapᴼᶠ(Iterator<T> wrap) {
static <T/*, B extends KaasOdeurBineral<?,?>*/> Rope<T> wrapᴼᶠ(Iterator<T> wrap) {
Objects.requireNonNull(wrap);
return new Rope<>() {
@Override