Renamed and runtime righted some base2 classes

This commit is contained in:
Willem Cazander 2022-02-02 18:26:21 +01:00
parent 1127edb6f9
commit e9095bca2c
29 changed files with 155 additions and 148 deletions

View file

@ -3,11 +3,11 @@ package love.distributedrebirth.numberxd;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
import love.distributedrebirth.numberxd.base2t.T08PartOctalBaseAppender; import love.distributedrebirth.numberxd.base2t.BaseAppenderOctal;
import love.distributedrebirth.numberxd.base2t.T08PartOctalBaseIterator; import love.distributedrebirth.numberxd.base2t.BaseIteratorOctal;
import love.distributedrebirth.numberxd.base2t.V009Tyte; import love.distributedrebirth.numberxd.base2t.V009Tyte;
import love.distributedrebirth.numberxd.base2t.V009TyteBaseAppender; import love.distributedrebirth.numberxd.base2t.BaseAppenderTyte;
import love.distributedrebirth.numberxd.base2t.V009TyteBaseIterator; import love.distributedrebirth.numberxd.base2t.BaseIteratorTyte;
import love.distributedrebirth.numberxd.base2t.V090Tocta; import love.distributedrebirth.numberxd.base2t.V090Tocta;
/** /**
@ -32,7 +32,7 @@ public class GroßGetậl1ⁿᴰ implements BaseGetậl<GroßGetậl1ⁿᴰ> {
} }
} }
public GroßGetậl1ⁿᴰ(T08PartOctalBaseIterator values) { public GroßGetậl1ⁿᴰ(BaseIteratorOctal values) {
for (int i=0;i<NUMERATOR_SIZE;i++) { for (int i=0;i<NUMERATOR_SIZE;i++) {
numerator[i] = new V009Tyte(values); numerator[i] = new V009Tyte(values);
} }
@ -41,7 +41,7 @@ public class GroßGetậl1ⁿᴰ implements BaseGetậl<GroßGetậl1ⁿᴰ> {
} }
} }
public GroßGetậl1ⁿᴰ(V009TyteBaseIterator values) { public GroßGetậl1ⁿᴰ(BaseIteratorTyte values) {
for (int i=0;i<NUMERATOR_SIZE;i++) { for (int i=0;i<NUMERATOR_SIZE;i++) {
numerator[i] = values.next(); numerator[i] = values.next();
} }
@ -52,7 +52,7 @@ public class GroßGetậl1ⁿᴰ implements BaseGetậl<GroßGetậl1ⁿᴰ> {
public GroßGetậl1ⁿᴰ(V090Tocta tocta) { public GroßGetậl1ⁿᴰ(V090Tocta tocta) {
List<V009Tyte> tytes = new ArrayList<>(); List<V009Tyte> tytes = new ArrayList<>();
tocta.fillTytesByReference(new V009TyteBaseAppender(tytes)); tocta.fillTytesByReference(new BaseAppenderTyte(tytes));
for (int i=0;i<NUMERATOR_SIZE;i++) { for (int i=0;i<NUMERATOR_SIZE;i++) {
numerator[i] = tytes.get(i); numerator[i] = tytes.get(i);
} }
@ -80,7 +80,7 @@ public class GroßGetậl1ⁿᴰ implements BaseGetậl<GroßGetậl1ⁿᴰ> {
} }
@Override @Override
public void fillOctalsByClone(T08PartOctalBaseAppender appender) { public void fillOctalsByClone(BaseAppenderOctal appender) {
for (int i=0;i<NUMERATOR_SIZE;i++) { for (int i=0;i<NUMERATOR_SIZE;i++) {
numerator[i].fillOctalsByClone(appender); numerator[i].fillOctalsByClone(appender);
} }
@ -90,7 +90,7 @@ public class GroßGetậl1ⁿᴰ implements BaseGetậl<GroßGetậl1ⁿᴰ> {
} }
@Override @Override
public void fillTytesByReference(V009TyteBaseAppender appender) { public void fillTytesByReference(BaseAppenderTyte appender) {
for (int i=0;i<NUMERATOR_SIZE;i++) { for (int i=0;i<NUMERATOR_SIZE;i++) {
appender.add(numerator[i]); appender.add(numerator[i]);
} }

View file

@ -1,11 +1,11 @@
package love.distributedrebirth.numberxd; package love.distributedrebirth.numberxd;
import love.distributedrebirth.numberxd.base2t.BaseNumberTyte; import love.distributedrebirth.numberxd.base2t.BaseNumberTyte;
import love.distributedrebirth.numberxd.base2t.T08PartOctalBaseAppender; import love.distributedrebirth.numberxd.base2t.BaseAppenderOctal;
import love.distributedrebirth.numberxd.base2t.T08PartOctalBaseIterator; import love.distributedrebirth.numberxd.base2t.BaseIteratorOctal;
import love.distributedrebirth.numberxd.base2t.T12PartUncial; import love.distributedrebirth.numberxd.base2t.T12PartUncial;
import love.distributedrebirth.numberxd.base2t.V009TyteBaseAppender; import love.distributedrebirth.numberxd.base2t.BaseAppenderTyte;
import love.distributedrebirth.numberxd.base2t.V009TyteBaseIterator; import love.distributedrebirth.numberxd.base2t.BaseIteratorTyte;
/** /**
* Holds an 864 bit fraction. * Holds an 864 bit fraction.
@ -23,13 +23,13 @@ public class GroßGetậl6ˢᴰ implements BaseNumberTyte<GroßGetậl6ˢᴰ> {
} }
} }
public GroßGetậl6ˢᴰ(T08PartOctalBaseIterator values) { public GroßGetậl6ˢᴰ(BaseIteratorOctal values) {
for (int i=0;i<this.values.length;i++) { for (int i=0;i<this.values.length;i++) {
this.values[i] = new GroßGetậl1ⁿᴰ(values); this.values[i] = new GroßGetậl1ⁿᴰ(values);
} }
} }
public GroßGetậl6ˢᴰ(V009TyteBaseIterator values) { public GroßGetậl6ˢᴰ(BaseIteratorTyte values) {
for (int i=0;i<this.values.length;i++) { for (int i=0;i<this.values.length;i++) {
this.values[i] = new GroßGetậl1ⁿᴰ(values); this.values[i] = new GroßGetậl1ⁿᴰ(values);
} }
@ -54,12 +54,12 @@ public class GroßGetậl6ˢᴰ implements BaseNumberTyte<GroßGetậl6ˢᴰ> {
} }
@Override @Override
public void fillOctalsByClone(T08PartOctalBaseAppender appender) { public void fillOctalsByClone(BaseAppenderOctal appender) {
T12PartUncial.PART_1.staticVoorElk(v -> getValue(v).fillOctalsByClone(appender)); T12PartUncial.PART_1.staticVoorElk(v -> getValue(v).fillOctalsByClone(appender));
} }
@Override @Override
public void fillTytesByReference(V009TyteBaseAppender appender) { public void fillTytesByReference(BaseAppenderTyte appender) {
T12PartUncial.PART_1.staticVoorElk(v -> getValue(v).fillTytesByReference(appender)); T12PartUncial.PART_1.staticVoorElk(v -> getValue(v).fillTytesByReference(appender));
} }
} }

View file

@ -1,8 +1,8 @@
package love.distributedrebirth.numberxd; package love.distributedrebirth.numberxd;
import love.distributedrebirth.numberxd.base2t.BaseNumber; import love.distributedrebirth.numberxd.base2t.BaseNumber;
import love.distributedrebirth.numberxd.base2t.T08PartOctalBaseAppender; import love.distributedrebirth.numberxd.base2t.BaseAppenderOctal;
import love.distributedrebirth.numberxd.base2t.T08PartOctalBaseIterator; import love.distributedrebirth.numberxd.base2t.BaseIteratorOctal;
/** /**
* Divide GroßGetậl1ⁿᴰ into resolved fractal slices. * Divide GroßGetậl1ⁿᴰ into resolved fractal slices.
@ -54,7 +54,7 @@ abstract public class GroßGetậlŌṁ1ⁿᴰ<V extends GroßGetậlŌṁ1ⁿ
@Override @Override
public final V toClone() { public final V toClone() {
V result = toCloneFractal(getFractalLevel()); V result = toCloneFractal(getFractalLevel());
T08PartOctalBaseIterator clonedOctals = iteratorOctalsByClone(); BaseIteratorOctal clonedOctals = iteratorOctalsByClone();
for (int i=0;i<getValuesLength();i++) { for (int i=0;i<getValuesLength();i++) {
result.setValue(i, new GroßGetậl1ⁿᴰ(clonedOctals)); result.setValue(i, new GroßGetậl1ⁿᴰ(clonedOctals));
} }
@ -67,7 +67,7 @@ abstract public class GroßGetậlŌṁ1ⁿᴰ<V extends GroßGetậlŌṁ1ⁿ
} }
@Override @Override
public final void fillOctalsByClone(T08PartOctalBaseAppender appender) { public final void fillOctalsByClone(BaseAppenderOctal appender) {
for (GroßGetậl1ⁿᴰ value:values) { for (GroßGetậl1ⁿᴰ value:values) {
value.fillOctalsByClone(appender); value.fillOctalsByClone(appender);
} }

View file

@ -1,8 +1,8 @@
package love.distributedrebirth.numberxd; package love.distributedrebirth.numberxd;
import love.distributedrebirth.numberxd.base2t.BaseNumber; import love.distributedrebirth.numberxd.base2t.BaseNumber;
import love.distributedrebirth.numberxd.base2t.T08PartOctalBaseAppender; import love.distributedrebirth.numberxd.base2t.BaseAppenderOctal;
import love.distributedrebirth.numberxd.base2t.T08PartOctalBaseIterator; import love.distributedrebirth.numberxd.base2t.BaseIteratorOctal;
/** /**
* Divide GroßGetậl6ˢᴰ into resolved fractal slices. * Divide GroßGetậl6ˢᴰ into resolved fractal slices.
@ -54,7 +54,7 @@ abstract public class GroßGetậlŌṁ6ˢᴰ<V extends GroßGetậlŌṁ6ˢᴰ<
@Override @Override
public final V toClone() { public final V toClone() {
V result = toCloneFractal(getFractalLevel()); V result = toCloneFractal(getFractalLevel());
T08PartOctalBaseIterator clonedOctals = iteratorOctalsByClone(); BaseIteratorOctal clonedOctals = iteratorOctalsByClone();
for (int i=0;i<getValuesLength();i++) { for (int i=0;i<getValuesLength();i++) {
result.setValue(i, new GroßGetậl6ˢᴰ(clonedOctals)); result.setValue(i, new GroßGetậl6ˢᴰ(clonedOctals));
} }
@ -67,7 +67,7 @@ abstract public class GroßGetậlŌṁ6ˢᴰ<V extends GroßGetậlŌṁ6ˢᴰ<
} }
@Override @Override
public final void fillOctalsByClone(T08PartOctalBaseAppender appender) { public final void fillOctalsByClone(BaseAppenderOctal appender) {
for (GroßGetậl6ˢᴰ value:values) { for (GroßGetậl6ˢᴰ value:values) {
value.fillOctalsByClone(appender); value.fillOctalsByClone(appender);
} }

View file

@ -2,9 +2,9 @@ package love.distributedrebirth.numberxd;
import love.distributedrebirth.numberxd.base2t.BaseNumberTyte; import love.distributedrebirth.numberxd.base2t.BaseNumberTyte;
import love.distributedrebirth.numberxd.base2t.T08PartOctal; import love.distributedrebirth.numberxd.base2t.T08PartOctal;
import love.distributedrebirth.numberxd.base2t.T08PartOctalBaseAppender; import love.distributedrebirth.numberxd.base2t.BaseAppenderOctal;
import love.distributedrebirth.numberxd.base2t.T08PartOctalBaseIterator; import love.distributedrebirth.numberxd.base2t.BaseIteratorOctal;
import love.distributedrebirth.numberxd.base2t.V009TyteBaseAppender; import love.distributedrebirth.numberxd.base2t.BaseAppenderTyte;
import love.distributedrebirth.numberxd.base2t.V654Triz; import love.distributedrebirth.numberxd.base2t.V654Triz;
import love.distributedrebirth.numberxd.base2t.VCA8Tath; import love.distributedrebirth.numberxd.base2t.VCA8Tath;
@ -27,7 +27,7 @@ public class KlompGetậl4ˢᴰ implements BaseNumberTyte<KlompGetậl4ˢᴰ> {
} }
} }
public KlompGetậl4ˢᴰ(T08PartOctalBaseIterator values) { public KlompGetậl4ˢᴰ(BaseIteratorOctal values) {
for (int i=0;i<this.values.length;i++) { for (int i=0;i<this.values.length;i++) {
this.values[i] = new VCA8Tath(values); this.values[i] = new VCA8Tath(values);
} }
@ -52,12 +52,12 @@ public class KlompGetậl4ˢᴰ implements BaseNumberTyte<KlompGetậl4ˢᴰ> {
} }
@Override @Override
public void fillOctalsByClone(T08PartOctalBaseAppender appender) { public void fillOctalsByClone(BaseAppenderOctal appender) {
T08PartOctal.PART_1.staticVoorElk(v -> getValue(v).fillOctalsByClone(appender)); T08PartOctal.PART_1.staticVoorElk(v -> getValue(v).fillOctalsByClone(appender));
} }
@Override @Override
public void fillTytesByReference(V009TyteBaseAppender appender) { public void fillTytesByReference(BaseAppenderTyte appender) {
T08PartOctal.PART_1.staticVoorElk(v -> getValue(v).fillTytesByReference(appender)); T08PartOctal.PART_1.staticVoorElk(v -> getValue(v).fillTytesByReference(appender));
} }
} }

View file

@ -1,9 +1,9 @@
package love.distributedrebirth.numberxd; package love.distributedrebirth.numberxd;
import love.distributedrebirth.numberxd.base2t.BaseNumberTyte; import love.distributedrebirth.numberxd.base2t.BaseNumberTyte;
import love.distributedrebirth.numberxd.base2t.T08PartOctalBaseAppender; import love.distributedrebirth.numberxd.base2t.BaseAppenderOctal;
import love.distributedrebirth.numberxd.base2t.T08PartOctalBaseIterator; import love.distributedrebirth.numberxd.base2t.BaseIteratorOctal;
import love.distributedrebirth.numberxd.base2t.V009TyteBaseAppender; import love.distributedrebirth.numberxd.base2t.BaseAppenderTyte;
/** /**
* Array of ŌṁKlompGetậl4ˢᴰ sliced as cheese. * Array of ŌṁKlompGetậl4ˢᴰ sliced as cheese.
@ -45,7 +45,7 @@ public class KlompÅtŌṁKāassGetậl4ˢᴰ implements BaseNumberTyte<KlompÅt
@Override @Override
public final KlompÅtŌṁKāassGetậl4ˢᴰ toClone() { public final KlompÅtŌṁKāassGetậl4ˢᴰ toClone() {
KlompÅtŌṁKāassGetậl4ˢᴰ result = new KlompÅtŌṁKāassGetậl4ˢᴰ(getKaasCuts()); KlompÅtŌṁKāassGetậl4ˢᴰ result = new KlompÅtŌṁKāassGetậl4ˢᴰ(getKaasCuts());
T08PartOctalBaseIterator clonedOctals = iteratorOctalsByClone(); BaseIteratorOctal clonedOctals = iteratorOctalsByClone();
for (int i=0;i<getKaasCuts();i++) { for (int i=0;i<getKaasCuts();i++) {
result.setValue(i, new KlompGetậl4ˢᴰ(clonedOctals)); result.setValue(i, new KlompGetậl4ˢᴰ(clonedOctals));
} }
@ -58,14 +58,14 @@ public class KlompÅtŌṁKāassGetậl4ˢᴰ implements BaseNumberTyte<KlompÅt
} }
@Override @Override
public final void fillOctalsByClone(T08PartOctalBaseAppender appender) { public final void fillOctalsByClone(BaseAppenderOctal appender) {
for (KlompGetậl4ˢᴰ value:kaas) { for (KlompGetậl4ˢᴰ value:kaas) {
value.fillOctalsByClone(appender); value.fillOctalsByClone(appender);
} }
} }
@Override @Override
public void fillTytesByReference(V009TyteBaseAppender appender) { public void fillTytesByReference(BaseAppenderTyte appender) {
for (KlompGetậl4ˢᴰ value:kaas) { for (KlompGetậl4ˢᴰ value:kaas) {
value.fillTytesByReference(appender); value.fillTytesByReference(appender);
} }

View file

@ -7,11 +7,12 @@ import java.util.ArrayList;
import java.util.Iterator; import java.util.Iterator;
import java.util.List; import java.util.List;
import love.distributedrebirth.bassboonyd.BãßBȍőnAuthorInfoʸᴰ;
/** /**
* Terminate from and to classical bytes. * Terminate from and to classical bytes.
*
* @author willemtsade ©Δ 仙上主天
*/ */
@BãßBȍőnAuthorInfoʸᴰ(name = "willemtsade", copyright = "©Δ∞ 仙上主天")
public class Base2Terminator { public class Base2Terminator {
private static final int STREAM_EOF = -1; private static final int STREAM_EOF = -1;
private static final int BLOCK_TONG_SIZE = 9; private static final int BLOCK_TONG_SIZE = 9;
@ -29,7 +30,7 @@ public class Base2Terminator {
int v1 = data[3] + (data[4] << SHIFT_8) + (data[5] << SHIFT_16); int v1 = data[3] + (data[4] << SHIFT_8) + (data[5] << SHIFT_16);
int v2 = data[6] + (data[7] << SHIFT_8) + (data[8] << SHIFT_16); int v2 = data[6] + (data[7] << SHIFT_8) + (data[8] << SHIFT_16);
List<T08PartOctal> octals = base2ReadOctals(v0, v1, v2); List<T08PartOctal> octals = base2ReadOctals(v0, v1, v2);
output.add(new V048Tong(new T08PartOctalBaseIterator(octals.iterator()))); output.add(new V048Tong(new BaseIteratorOctal(octals.iterator())));
totalBytes += BLOCK_TONG_SIZE; totalBytes += BLOCK_TONG_SIZE;
} }
return totalBytes; return totalBytes;
@ -48,7 +49,7 @@ public class Base2Terminator {
int v4 = data[12] + (data[13] << SHIFT_8) + (data[14] << SHIFT_16); int v4 = data[12] + (data[13] << SHIFT_8) + (data[14] << SHIFT_16);
int v5 = data[15] + (data[16] << SHIFT_8) + (data[17] << SHIFT_16); int v5 = data[15] + (data[16] << SHIFT_8) + (data[17] << SHIFT_16);
List<T08PartOctal> octals = base2ReadOctals(v0, v1, v2, v3, v4, v5); List<T08PartOctal> octals = base2ReadOctals(v0, v1, v2, v3, v4, v5);
output.add(new V090Tocta(new T08PartOctalBaseIterator(octals.iterator()))); output.add(new V090Tocta(new BaseIteratorOctal(octals.iterator())));
totalBytes += BLOCK_TOCTA_SIZE; totalBytes += BLOCK_TOCTA_SIZE;
} }
return totalBytes; return totalBytes;
@ -79,7 +80,7 @@ public class Base2Terminator {
private <T extends BaseNumber<T>> int base2Write(List<T> data, OutputStream output) throws IOException { private <T extends BaseNumber<T>> int base2Write(List<T> data, OutputStream output) throws IOException {
int totalBytes = 0; // per 8 octa's is 3 bytes int totalBytes = 0; // per 8 octa's is 3 bytes
List<T08PartOctal> octals = new ArrayList<>(); List<T08PartOctal> octals = new ArrayList<>();
T08PartOctalBaseAppender appender = new T08PartOctalBaseAppender(octals); BaseAppenderOctal appender = new BaseAppenderOctal(octals);
data.forEach(v -> v.fillOctalsByClone(appender)); data.forEach(v -> v.fillOctalsByClone(appender));
Iterator<T08PartOctal> read = octals.iterator(); Iterator<T08PartOctal> read = octals.iterator();
while (read.hasNext()) { while (read.hasNext()) {

View file

@ -1,10 +1,8 @@
package love.distributedrebirth.numberxd.base2t; package love.distributedrebirth.numberxd.base2t;
/** import love.distributedrebirth.bassboonyd.BãßBȍőnAuthorInfoʸᴰ;
* Collection appender interface.
* @BãßBȍőnAuthorInfoʸᴰ(name = "willemtsade", copyright = "©Δ∞ 仙上主天")
* @author willemtsade ©Δ 仙上主天
*/
public interface BaseAppender<T> { public interface BaseAppender<T> {
void add(T value); void add(T value);

View file

@ -0,0 +1,23 @@
package love.distributedrebirth.numberxd.base2t;
import java.util.Collection;
import love.distributedrebirth.bassboonyd.BãßBȍőnAuthorInfoʸᴰ;
/**
* Appender model for Octals.
*/
@BãßBȍőnAuthorInfoʸᴰ(name = "willemtsade", copyright = "©Δ∞ 仙上主天")
public final class BaseAppenderOctal implements BaseAppender<T08PartOctal> {
private final Collection<T08PartOctal> collection;
public BaseAppenderOctal(Collection<T08PartOctal> collection) {
this.collection = collection;
}
@Override
public void add(T08PartOctal value) {
collection.add(value);
}
}

View file

@ -0,0 +1,23 @@
package love.distributedrebirth.numberxd.base2t;
import java.util.Collection;
import love.distributedrebirth.bassboonyd.BãßBȍőnAuthorInfoʸᴰ;
/**
* Appender model for Tytes.
*/
@BãßBȍőnAuthorInfoʸᴰ(name = "willemtsade", copyright = "©Δ∞ 仙上主天")
public final class BaseAppenderTyte implements BaseAppender<V009Tyte> {
private final Collection<V009Tyte> collection;
public BaseAppenderTyte(Collection<V009Tyte> collection) {
this.collection = collection;
}
@Override
public void add(V009Tyte value) {
collection.add(value);
}
}

View file

@ -2,16 +2,17 @@ package love.distributedrebirth.numberxd.base2t;
import java.util.Iterator; import java.util.Iterator;
import love.distributedrebirth.bassboonyd.BãßBȍőnAuthorInfoʸᴰ;
/** /**
* Iterator model for Octals. * Iterator model for Octals.
*
* @author willemtsade ©Δ 仙上主天
*/ */
public final class T08PartOctalBaseIterator implements Iterator<T08PartOctal> { @BãßBȍőnAuthorInfoʸᴰ(name = "willemtsade", copyright = "©Δ∞ 仙上主天")
public final class BaseIteratorOctal implements Iterator<T08PartOctal> {
private final Iterator<T08PartOctal> iterator; private final Iterator<T08PartOctal> iterator;
public T08PartOctalBaseIterator(Iterator<T08PartOctal> iterator) { public BaseIteratorOctal(Iterator<T08PartOctal> iterator) {
this.iterator = iterator; this.iterator = iterator;
} }

View file

@ -2,16 +2,17 @@ package love.distributedrebirth.numberxd.base2t;
import java.util.Iterator; import java.util.Iterator;
import love.distributedrebirth.bassboonyd.BãßBȍőnAuthorInfoʸᴰ;
/** /**
* Iterator model for Tytes. * Iterator model for Tytes.
*
* @author willemtsade ©Δ 仙上主天
*/ */
public final class V009TyteBaseIterator implements Iterator<V009Tyte> { @BãßBȍőnAuthorInfoʸᴰ(name = "willemtsade", copyright = "©Δ∞ 仙上主天")
public final class BaseIteratorTyte implements Iterator<V009Tyte> {
private final Iterator<V009Tyte> iterator; private final Iterator<V009Tyte> iterator;
public V009TyteBaseIterator(Iterator<V009Tyte> iterator) { public BaseIteratorTyte(Iterator<V009Tyte> iterator) {
this.iterator = iterator; this.iterator = iterator;
} }

View file

@ -3,11 +3,12 @@ package love.distributedrebirth.numberxd.base2t;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
import love.distributedrebirth.bassboonyd.BãßBȍőnAuthorInfoʸᴰ;
/** /**
* Octal base based number interface. * Octal base based number interface.
*
* @author willemtsade ©Δ 仙上主天
*/ */
@BãßBȍőnAuthorInfoʸᴰ(name = "willemtsade", copyright = "©Δ∞ 仙上主天")
public interface BaseNumber<V extends BaseNumber<V>> { public interface BaseNumber<V extends BaseNumber<V>> {
static float CIRCLE_DEGREE = 360f; static float CIRCLE_DEGREE = 360f;
@ -20,11 +21,11 @@ public interface BaseNumber<V extends BaseNumber<V>> {
V toClone(); V toClone();
void fillOctalsByClone(T08PartOctalBaseAppender appender); void fillOctalsByClone(BaseAppenderOctal appender);
default T08PartOctalBaseIterator iteratorOctalsByClone() { default BaseIteratorOctal iteratorOctalsByClone() {
List<T08PartOctal> octals = new ArrayList<>(); List<T08PartOctal> octals = new ArrayList<>();
fillOctalsByClone(new T08PartOctalBaseAppender(octals)); fillOctalsByClone(new BaseAppenderOctal(octals));
return new T08PartOctalBaseIterator(octals.iterator()); return new BaseIteratorOctal(octals.iterator());
} }
} }

View file

@ -3,18 +3,19 @@ package love.distributedrebirth.numberxd.base2t;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
import love.distributedrebirth.bassboonyd.BãßBȍőnAuthorInfoʸᴰ;
/** /**
* Adds Tyte fill and reference support. * Adds Tyte fill and reference support.
*
* @author willemtsade ©Δ 仙上主天
*/ */
@BãßBȍőnAuthorInfoʸᴰ(name = "willemtsade", copyright = "©Δ∞ 仙上主天")
public interface BaseNumberTyte<V extends BaseNumber<V>> extends BaseNumber<V> { public interface BaseNumberTyte<V extends BaseNumber<V>> extends BaseNumber<V> {
void fillTytesByReference(V009TyteBaseAppender appender); void fillTytesByReference(BaseAppenderTyte appender);
default V009TyteBaseIterator iteratorTytesByReference() { default BaseIteratorTyte iteratorTytesByReference() {
List<V009Tyte> tytes = new ArrayList<>(); List<V009Tyte> tytes = new ArrayList<>();
fillTytesByReference(new V009TyteBaseAppender(tytes)); fillTytesByReference(new BaseAppenderTyte(tytes));
return new V009TyteBaseIterator(tytes.iterator()); return new BaseIteratorTyte(tytes.iterator());
} }
} }

View file

@ -1,7 +1,9 @@
package love.distributedrebirth.numberxd.base2t; package love.distributedrebirth.numberxd.base2t;
import love.distributedrebirth.bassboonyd.BãßBȍőnAuthorInfoʸᴰ;
import love.distributedrebirth.numberxd.base2t.part.BãßBȍőnPart; import love.distributedrebirth.numberxd.base2t.part.BãßBȍőnPart;
@BãßBȍőnAuthorInfoʸᴰ(name = "willemtsade", copyright = "©Δ∞ 仙上主天")
public final class BasePartFactory { public final class BasePartFactory {
private static final int[] SUPPORTED_BASES = {2,3,4,5,6,7,8,10,11,12,16,20,60}; private static final int[] SUPPORTED_BASES = {2,3,4,5,6,7,8,10,11,12,16,20,60};

View file

@ -1,22 +0,0 @@
package love.distributedrebirth.numberxd.base2t;
import java.util.Collection;
/**
* Appender model for Octals.
*
* @author willemtsade ©Δ 仙上主天
*/
public final class T08PartOctalBaseAppender implements BaseAppender<T08PartOctal> {
private final Collection<T08PartOctal> collection;
public T08PartOctalBaseAppender(Collection<T08PartOctal> collection) {
this.collection = collection;
}
@Override
public void add(T08PartOctal value) {
collection.add(value);
}
}

View file

@ -14,7 +14,7 @@ public final class V003Timble implements BaseNumber<V003Timble> {
this(T08PartOctal.PART_1); this(T08PartOctal.PART_1);
} }
public V003Timble(T08PartOctalBaseIterator values) { public V003Timble(BaseIteratorOctal values) {
this(values.next()); this(values.next());
} }
@ -37,7 +37,7 @@ public final class V003Timble implements BaseNumber<V003Timble> {
} }
@Override @Override
public void fillOctalsByClone(T08PartOctalBaseAppender appender) { public void fillOctalsByClone(BaseAppenderOctal appender) {
appender.add(getValue()); appender.add(getValue());
} }
} }

View file

@ -14,7 +14,7 @@ public final class V006Tixte implements BaseNumber<V006Tixte> {
this(new V003Timble(), new V003Timble()); this(new V003Timble(), new V003Timble());
} }
public V006Tixte(T08PartOctalBaseIterator values) { public V006Tixte(BaseIteratorOctal values) {
this(new V003Timble(values), new V003Timble(values)); this(new V003Timble(values), new V003Timble(values));
} }
@ -42,7 +42,7 @@ public final class V006Tixte implements BaseNumber<V006Tixte> {
} }
@Override @Override
public void fillOctalsByClone(T08PartOctalBaseAppender appender) { public void fillOctalsByClone(BaseAppenderOctal appender) {
T02PartBinary.PART_1.staticVoorElk(v -> getValue(v).fillOctalsByClone(appender)); T02PartBinary.PART_1.staticVoorElk(v -> getValue(v).fillOctalsByClone(appender));
} }
} }

View file

@ -14,7 +14,7 @@ public final class V009Tyte implements BaseNumberTyte<V009Tyte> {
this(new V003Timble(), new V003Timble(), new V003Timble()); this(new V003Timble(), new V003Timble(), new V003Timble());
} }
public V009Tyte(T08PartOctalBaseIterator values) { public V009Tyte(BaseIteratorOctal values) {
this(new V003Timble(values), new V003Timble(values), new V003Timble(values)); this(new V003Timble(values), new V003Timble(values), new V003Timble(values));
} }
@ -43,12 +43,12 @@ public final class V009Tyte implements BaseNumberTyte<V009Tyte> {
} }
@Override @Override
public void fillOctalsByClone(T08PartOctalBaseAppender appender) { public void fillOctalsByClone(BaseAppenderOctal appender) {
T03PartTrit.PART_1.staticVoorElk(v -> getValue(v).fillOctalsByClone(appender)); T03PartTrit.PART_1.staticVoorElk(v -> getValue(v).fillOctalsByClone(appender));
} }
@Override @Override
public void fillTytesByReference(V009TyteBaseAppender appender) { public void fillTytesByReference(BaseAppenderTyte appender) {
appender.add(this); appender.add(this);
} }
} }

View file

@ -1,22 +0,0 @@
package love.distributedrebirth.numberxd.base2t;
import java.util.Collection;
/**
* Appender model for Tytes.
*
* @author willemtsade ©Δ 仙上主天
*/
public final class V009TyteBaseAppender implements BaseAppender<V009Tyte> {
private final Collection<V009Tyte> collection;
public V009TyteBaseAppender(Collection<V009Tyte> collection) {
this.collection = collection;
}
@Override
public void add(V009Tyte value) {
collection.add(value);
}
}

View file

@ -14,11 +14,11 @@ public final class V012Tord implements BaseNumberTyte<V012Tord> {
this(new V009Tyte(), new V009Tyte()); this(new V009Tyte(), new V009Tyte());
} }
public V012Tord(T08PartOctalBaseIterator values) { public V012Tord(BaseIteratorOctal values) {
this(new V009Tyte(values), new V009Tyte(values)); this(new V009Tyte(values), new V009Tyte(values));
} }
public V012Tord(V009TyteBaseIterator values) { public V012Tord(BaseIteratorTyte values) {
this(values.next(), values.next()); this(values.next(), values.next());
} }
@ -50,12 +50,12 @@ public final class V012Tord implements BaseNumberTyte<V012Tord> {
} }
@Override @Override
public void fillOctalsByClone(T08PartOctalBaseAppender appender) { public void fillOctalsByClone(BaseAppenderOctal appender) {
T02PartBinary.PART_1.staticVoorElk(v -> getValue(v).fillOctalsByClone(appender)); T02PartBinary.PART_1.staticVoorElk(v -> getValue(v).fillOctalsByClone(appender));
} }
@Override @Override
public void fillTytesByReference(V009TyteBaseAppender appender) { public void fillTytesByReference(BaseAppenderTyte appender) {
T02PartBinary.PART_1.staticVoorElk(v -> getValue(v).fillTytesByReference(appender)); T02PartBinary.PART_1.staticVoorElk(v -> getValue(v).fillTytesByReference(appender));
} }
} }

View file

@ -14,11 +14,11 @@ public final class V01BTemvig implements BaseNumberTyte<V01BTemvig> {
this(new V009Tyte(), new V009Tyte(), new V009Tyte()); this(new V009Tyte(), new V009Tyte(), new V009Tyte());
} }
public V01BTemvig(T08PartOctalBaseIterator values) { public V01BTemvig(BaseIteratorOctal values) {
this(new V009Tyte(values), new V009Tyte(values), new V009Tyte(values)); this(new V009Tyte(values), new V009Tyte(values), new V009Tyte(values));
} }
public V01BTemvig(V009TyteBaseIterator values) { public V01BTemvig(BaseIteratorTyte values) {
this(values.next(), values.next(), values.next()); this(values.next(), values.next(), values.next());
} }
@ -47,12 +47,12 @@ public final class V01BTemvig implements BaseNumberTyte<V01BTemvig> {
} }
@Override @Override
public void fillOctalsByClone(T08PartOctalBaseAppender appender) { public void fillOctalsByClone(BaseAppenderOctal appender) {
T03PartTrit.PART_1.staticVoorElk(v -> getValue(v).fillOctalsByClone(appender)); T03PartTrit.PART_1.staticVoorElk(v -> getValue(v).fillOctalsByClone(appender));
} }
@Override @Override
public void fillTytesByReference(V009TyteBaseAppender appender) { public void fillTytesByReference(BaseAppenderTyte appender) {
T03PartTrit.PART_1.staticVoorElk(v -> getValue(v).fillTytesByReference(appender)); T03PartTrit.PART_1.staticVoorElk(v -> getValue(v).fillTytesByReference(appender));
} }
} }

View file

@ -14,11 +14,11 @@ public final class V024Teger implements BaseNumberTyte<V024Teger> {
this(new V012Tord(), new V012Tord()); this(new V012Tord(), new V012Tord());
} }
public V024Teger(T08PartOctalBaseIterator values) { public V024Teger(BaseIteratorOctal values) {
this(new V012Tord(values), new V012Tord(values)); this(new V012Tord(values), new V012Tord(values));
} }
public V024Teger(V009TyteBaseIterator values) { public V024Teger(BaseIteratorTyte values) {
this(new V012Tord(values), new V012Tord(values)); this(new V012Tord(values), new V012Tord(values));
} }
@ -56,12 +56,12 @@ public final class V024Teger implements BaseNumberTyte<V024Teger> {
} }
@Override @Override
public void fillOctalsByClone(T08PartOctalBaseAppender appender) { public void fillOctalsByClone(BaseAppenderOctal appender) {
T02PartBinary.PART_1.staticVoorElk(v -> getValue(v).fillOctalsByClone(appender)); T02PartBinary.PART_1.staticVoorElk(v -> getValue(v).fillOctalsByClone(appender));
} }
@Override @Override
public void fillTytesByReference(V009TyteBaseAppender appender) { public void fillTytesByReference(BaseAppenderTyte appender) {
T02PartBinary.PART_1.staticVoorElk(v -> getValue(v).fillTytesByReference(appender)); T02PartBinary.PART_1.staticVoorElk(v -> getValue(v).fillTytesByReference(appender));
} }
} }

View file

@ -16,7 +16,7 @@ public final class V02ATraw implements BaseNumber<V02ATraw> {
} }
} }
public V02ATraw(T08PartOctalBaseIterator values) { public V02ATraw(BaseIteratorOctal values) {
for (int i=0;i<this.values.length;i++) { for (int i=0;i<this.values.length;i++) {
this.values[i] = new V006Tixte(values); this.values[i] = new V006Tixte(values);
} }
@ -41,7 +41,7 @@ public final class V02ATraw implements BaseNumber<V02ATraw> {
} }
@Override @Override
public void fillOctalsByClone(T08PartOctalBaseAppender appender) { public void fillOctalsByClone(BaseAppenderOctal appender) {
T07PartPlanIt.PART_1.staticVoorElk(v -> getValue(v).fillOctalsByClone(appender)); T07PartPlanIt.PART_1.staticVoorElk(v -> getValue(v).fillOctalsByClone(appender));
} }
} }

View file

@ -14,11 +14,11 @@ public final class V048Tong implements BaseNumberTyte<V048Tong> {
this(new V024Teger(), new V024Teger()); this(new V024Teger(), new V024Teger());
} }
public V048Tong(T08PartOctalBaseIterator values) { public V048Tong(BaseIteratorOctal values) {
this(new V024Teger(values), new V024Teger(values)); this(new V024Teger(values), new V024Teger(values));
} }
public V048Tong(V009TyteBaseIterator values) { public V048Tong(BaseIteratorTyte values) {
this(new V024Teger(values), new V024Teger(values)); this(new V024Teger(values), new V024Teger(values));
} }
@ -58,12 +58,12 @@ public final class V048Tong implements BaseNumberTyte<V048Tong> {
} }
@Override @Override
public void fillOctalsByClone(T08PartOctalBaseAppender appender) { public void fillOctalsByClone(BaseAppenderOctal appender) {
T02PartBinary.PART_1.staticVoorElk(v -> getValue(v).fillOctalsByClone(appender)); T02PartBinary.PART_1.staticVoorElk(v -> getValue(v).fillOctalsByClone(appender));
} }
@Override @Override
public void fillTytesByReference(V009TyteBaseAppender appender) { public void fillTytesByReference(BaseAppenderTyte appender) {
T02PartBinary.PART_1.staticVoorElk(v -> getValue(v).fillTytesByReference(appender)); T02PartBinary.PART_1.staticVoorElk(v -> getValue(v).fillTytesByReference(appender));
} }
} }

View file

@ -14,11 +14,11 @@ public final class V090Tocta implements BaseNumberTyte<V090Tocta> {
this(new V048Tong(), new V048Tong()); this(new V048Tong(), new V048Tong());
} }
public V090Tocta(T08PartOctalBaseIterator values) { public V090Tocta(BaseIteratorOctal values) {
this(new V048Tong(values), new V048Tong(values)); this(new V048Tong(values), new V048Tong(values));
} }
public V090Tocta(V009TyteBaseIterator values) { public V090Tocta(BaseIteratorTyte values) {
this(new V048Tong(values), new V048Tong(values)); this(new V048Tong(values), new V048Tong(values));
} }
@ -72,12 +72,12 @@ public final class V090Tocta implements BaseNumberTyte<V090Tocta> {
} }
@Override @Override
public void fillOctalsByClone(T08PartOctalBaseAppender appender) { public void fillOctalsByClone(BaseAppenderOctal appender) {
T02PartBinary.PART_1.staticVoorElk(v -> getValue(v).fillOctalsByClone(appender)); T02PartBinary.PART_1.staticVoorElk(v -> getValue(v).fillOctalsByClone(appender));
} }
@Override @Override
public void fillTytesByReference(V009TyteBaseAppender appender) { public void fillTytesByReference(BaseAppenderTyte appender) {
T02PartBinary.PART_1.staticVoorElk(v -> getValue(v).fillTytesByReference(appender)); T02PartBinary.PART_1.staticVoorElk(v -> getValue(v).fillTytesByReference(appender));
} }
} }

View file

@ -16,7 +16,7 @@ public class V654Triz implements BaseNumberTyte<V654Triz> {
} }
} }
public V654Triz(T08PartOctalBaseIterator values) { public V654Triz(BaseIteratorOctal values) {
for (int i=0;i<this.values.length;i++) { for (int i=0;i<this.values.length;i++) {
this.values[i] = new V01BTemvig(values); this.values[i] = new V01BTemvig(values);
} }
@ -41,12 +41,12 @@ public class V654Triz implements BaseNumberTyte<V654Triz> {
} }
@Override @Override
public void fillOctalsByClone(T08PartOctalBaseAppender appender) { public void fillOctalsByClone(BaseAppenderOctal appender) {
T60PartSexagesimal.PART_1.staticVoorElk(v -> getValue(v).fillOctalsByClone(appender)); T60PartSexagesimal.PART_1.staticVoorElk(v -> getValue(v).fillOctalsByClone(appender));
} }
@Override @Override
public void fillTytesByReference(V009TyteBaseAppender appender) { public void fillTytesByReference(BaseAppenderTyte appender) {
T60PartSexagesimal.PART_1.staticVoorElk(v -> getValue(v).fillTytesByReference(appender)); T60PartSexagesimal.PART_1.staticVoorElk(v -> getValue(v).fillTytesByReference(appender));
} }
} }

View file

@ -16,7 +16,7 @@ public class V9D8Traz implements BaseNumber<V9D8Traz> {
} }
} }
public V9D8Traz(T08PartOctalBaseIterator values) { public V9D8Traz(BaseIteratorOctal values) {
for (int i=0;i<this.values.length;i++) { for (int i=0;i<this.values.length;i++) {
this.values[i] = new V02ATraw(values); this.values[i] = new V02ATraw(values);
} }
@ -41,7 +41,7 @@ public class V9D8Traz implements BaseNumber<V9D8Traz> {
} }
@Override @Override
public void fillOctalsByClone(T08PartOctalBaseAppender appender) { public void fillOctalsByClone(BaseAppenderOctal appender) {
T60PartSexagesimal.PART_1.staticVoorElk(v -> getValue(v).fillOctalsByClone(appender)); T60PartSexagesimal.PART_1.staticVoorElk(v -> getValue(v).fillOctalsByClone(appender));
} }
} }

View file

@ -14,7 +14,7 @@ public class VCA8Tath implements BaseNumberTyte<VCA8Tath> {
this(new V654Triz(), new V654Triz()); this(new V654Triz(), new V654Triz());
} }
public VCA8Tath(T08PartOctalBaseIterator values) { public VCA8Tath(BaseIteratorOctal values) {
this(new V654Triz(values), new V654Triz(values)); this(new V654Triz(values), new V654Triz(values));
} }
@ -42,12 +42,12 @@ public class VCA8Tath implements BaseNumberTyte<VCA8Tath> {
} }
@Override @Override
public void fillOctalsByClone(T08PartOctalBaseAppender appender) { public void fillOctalsByClone(BaseAppenderOctal appender) {
T02PartBinary.PART_1.staticVoorElk(v -> getValue(v).fillOctalsByClone(appender)); T02PartBinary.PART_1.staticVoorElk(v -> getValue(v).fillOctalsByClone(appender));
} }
@Override @Override
public void fillTytesByReference(V009TyteBaseAppender appender) { public void fillTytesByReference(BaseAppenderTyte appender) {
T02PartBinary.PART_1.staticVoorElk(v -> getValue(v).fillTytesByReference(appender)); T02PartBinary.PART_1.staticVoorElk(v -> getValue(v).fillTytesByReference(appender));
} }
} }