Added tyte ref copy

This commit is contained in:
Willem Cazander 2022-04-11 21:54:10 +02:00
parent b561d2eac6
commit 7aef73b979
10 changed files with 67 additions and 10 deletions

View file

@ -12,8 +12,6 @@ import love.distributedrebirth.numberxd.base2t.part.T08PartOctal;
@BãßBȍőnAuthorInfoʸᴰ(name = "willemtsade", copyright = "©Δ∞ 仙上主天") @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;
int BãßBitCount(); int BãßBitCount();
default V toClone() { default V toClone() {

View file

@ -12,6 +12,12 @@ import love.distributedrebirth.numberxd.base2t.type.V009Tyte;
@BãßBȍőnAuthorInfoʸᴰ(name = "willemtsade", copyright = "©Δ∞ 仙上主天") @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> {
default V toReference() {
return toReference(iteratorTytesByReference());
}
V toReference(BaseIteratorTyte values);
void fillTytesByReference(BaseAppenderTyte appender); void fillTytesByReference(BaseAppenderTyte appender);
default BaseIteratorTyte iteratorTytesByReference() { default BaseIteratorTyte iteratorTytesByReference() {

View file

@ -4,6 +4,7 @@ import love.distributedrebirth.bassboonyd.BãßBȍőnAuthorInfoʸᴰ;
import love.distributedrebirth.numberxd.base2t.BaseAppenderOctal; import love.distributedrebirth.numberxd.base2t.BaseAppenderOctal;
import love.distributedrebirth.numberxd.base2t.BaseAppenderTyte; import love.distributedrebirth.numberxd.base2t.BaseAppenderTyte;
import love.distributedrebirth.numberxd.base2t.BaseIteratorOctal; import love.distributedrebirth.numberxd.base2t.BaseIteratorOctal;
import love.distributedrebirth.numberxd.base2t.BaseIteratorTyte;
import love.distributedrebirth.numberxd.base2t.BaseNumberTyte; import love.distributedrebirth.numberxd.base2t.BaseNumberTyte;
import love.distributedrebirth.numberxd.base2t.part.T03PartTrit; import love.distributedrebirth.numberxd.base2t.part.T03PartTrit;
import love.distributedrebirth.numberxd.base2t.part.T08PartOctal; import love.distributedrebirth.numberxd.base2t.part.T08PartOctal;
@ -69,7 +70,12 @@ public final class V009Tyte implements BaseNumberTyte<V009Tyte> {
appender.add(values[1]); appender.add(values[1]);
appender.add(values[2]); appender.add(values[2]);
} }
@Override
public V009Tyte toReference(BaseIteratorTyte values) {
return values.next();
}
@Override @Override
public void fillTytesByReference(BaseAppenderTyte appender) { public void fillTytesByReference(BaseAppenderTyte appender) {
appender.add(this); appender.add(this);

View file

@ -78,7 +78,12 @@ public final class V018Tord implements BaseNumberTyte<V018Tord> {
public void fillOctalsByClone(BaseAppenderOctal appender) { public void fillOctalsByClone(BaseAppenderOctal appender) {
T02PartBinary.PART_1.BãßVoorElk(v -> getValue(v).fillOctalsByClone(appender)); T02PartBinary.PART_1.BãßVoorElk(v -> getValue(v).fillOctalsByClone(appender));
} }
@Override
public V018Tord toReference(BaseIteratorTyte values) {
return new V018Tord(values);
}
@Override @Override
public void fillTytesByReference(BaseAppenderTyte appender) { public void fillTytesByReference(BaseAppenderTyte appender) {
T02PartBinary.PART_1.BãßVoorElk(v -> getValue(v).fillTytesByReference(appender)); T02PartBinary.PART_1.BãßVoorElk(v -> getValue(v).fillTytesByReference(appender));

View file

@ -57,7 +57,12 @@ public final class V027Temvig implements BaseNumberTyte<V027Temvig> {
public void fillOctalsByClone(BaseAppenderOctal appender) { public void fillOctalsByClone(BaseAppenderOctal appender) {
T03PartTrit.PART_1.BãßVoorElk(v -> getValue(v).fillOctalsByClone(appender)); T03PartTrit.PART_1.BãßVoorElk(v -> getValue(v).fillOctalsByClone(appender));
} }
@Override
public V027Temvig toReference(BaseIteratorTyte values) {
return new V027Temvig(values);
}
@Override @Override
public void fillTytesByReference(BaseAppenderTyte appender) { public void fillTytesByReference(BaseAppenderTyte appender) {
T03PartTrit.PART_1.BãßVoorElk(v -> getValue(v).fillTytesByReference(appender)); T03PartTrit.PART_1.BãßVoorElk(v -> getValue(v).fillTytesByReference(appender));

View file

@ -79,7 +79,12 @@ public final class V036Teger implements BaseNumberTyte<V036Teger> {
public void fillOctalsByClone(BaseAppenderOctal appender) { public void fillOctalsByClone(BaseAppenderOctal appender) {
T02PartBinary.PART_1.BãßVoorElk(v -> getValue(v).fillOctalsByClone(appender)); T02PartBinary.PART_1.BãßVoorElk(v -> getValue(v).fillOctalsByClone(appender));
} }
@Override
public V036Teger toReference(BaseIteratorTyte values) {
return new V036Teger(values);
}
@Override @Override
public void fillTytesByReference(BaseAppenderTyte appender) { public void fillTytesByReference(BaseAppenderTyte appender) {
T02PartBinary.PART_1.BãßVoorElk(v -> getValue(v).fillTytesByReference(appender)); T02PartBinary.PART_1.BãßVoorElk(v -> getValue(v).fillTytesByReference(appender));

View file

@ -70,7 +70,12 @@ public final class V072Tong implements BaseNumberTyte<V072Tong> {
public void fillOctalsByClone(BaseAppenderOctal appender) { public void fillOctalsByClone(BaseAppenderOctal appender) {
T02PartBinary.PART_1.BãßVoorElk(v -> getValue(v).fillOctalsByClone(appender)); T02PartBinary.PART_1.BãßVoorElk(v -> getValue(v).fillOctalsByClone(appender));
} }
@Override
public V072Tong toReference(BaseIteratorTyte values) {
return new V072Tong(values);
}
@Override @Override
public void fillTytesByReference(BaseAppenderTyte appender) { public void fillTytesByReference(BaseAppenderTyte appender) {
T02PartBinary.PART_1.BãßVoorElk(v -> getValue(v).fillTytesByReference(appender)); T02PartBinary.PART_1.BãßVoorElk(v -> getValue(v).fillTytesByReference(appender));

View file

@ -86,7 +86,12 @@ public final class V144Tocta implements BaseNumberTyte<V144Tocta> {
public void fillOctalsByClone(BaseAppenderOctal appender) { public void fillOctalsByClone(BaseAppenderOctal appender) {
T02PartBinary.PART_1.BãßVoorElk(v -> getValue(v).fillOctalsByClone(appender)); T02PartBinary.PART_1.BãßVoorElk(v -> getValue(v).fillOctalsByClone(appender));
} }
@Override
public V144Tocta toReference(BaseIteratorTyte values) {
return new V144Tocta(values);
}
@Override @Override
public void fillTytesByReference(BaseAppenderTyte appender) { public void fillTytesByReference(BaseAppenderTyte appender) {
T02PartBinary.PART_1.BãßVoorElk(v -> getValue(v).fillTytesByReference(appender)); T02PartBinary.PART_1.BãßVoorElk(v -> getValue(v).fillTytesByReference(appender));

View file

@ -4,6 +4,7 @@ import love.distributedrebirth.bassboonyd.BãßBȍőnAuthorInfoʸᴰ;
import love.distributedrebirth.numberxd.base2t.BaseAppenderOctal; import love.distributedrebirth.numberxd.base2t.BaseAppenderOctal;
import love.distributedrebirth.numberxd.base2t.BaseAppenderTyte; import love.distributedrebirth.numberxd.base2t.BaseAppenderTyte;
import love.distributedrebirth.numberxd.base2t.BaseIteratorOctal; import love.distributedrebirth.numberxd.base2t.BaseIteratorOctal;
import love.distributedrebirth.numberxd.base2t.BaseIteratorTyte;
import love.distributedrebirth.numberxd.base2t.BaseNumberTyteˣᴸ; import love.distributedrebirth.numberxd.base2t.BaseNumberTyteˣᴸ;
import love.distributedrebirth.numberxd.base2t.part.T60PartSexagesimal; import love.distributedrebirth.numberxd.base2t.part.T60PartSexagesimal;
import love.distributedrebirth.numberxd.base2t.type.V027Temvig; import love.distributedrebirth.numberxd.base2t.type.V027Temvig;
@ -29,6 +30,12 @@ public class V0x000654ˣᴸ implements BaseNumberTyteˣᴸ<V0x000654ˣᴸ> {
} }
} }
public V0x000654ˣᴸ(BaseIteratorTyte values) {
for (int i=0;i<this.values.length;i++) {
this.values[i] = new V027Temvig(values);
}
}
public V027Temvig getValue(T60PartSexagesimal part) { public V027Temvig getValue(T60PartSexagesimal part) {
return values[part.ordinal()]; return values[part.ordinal()];
} }
@ -51,7 +58,12 @@ public class V0x000654ˣᴸ implements BaseNumberTyteˣᴸ<V0x000654ˣᴸ> {
public void fillOctalsByClone(BaseAppenderOctal appender) { public void fillOctalsByClone(BaseAppenderOctal appender) {
T60PartSexagesimal.PART_1.BãßVoorElk(v -> getValue(v).fillOctalsByClone(appender)); T60PartSexagesimal.PART_1.BãßVoorElk(v -> getValue(v).fillOctalsByClone(appender));
} }
@Override
public V0x000654ˣᴸ toReference(BaseIteratorTyte values) {
return new V0x000654ˣᴸ(values);
}
@Override @Override
public void fillTytesByReference(BaseAppenderTyte appender) { public void fillTytesByReference(BaseAppenderTyte appender) {
T60PartSexagesimal.PART_1.BãßVoorElk(v -> getValue(v).fillTytesByReference(appender)); T60PartSexagesimal.PART_1.BãßVoorElk(v -> getValue(v).fillTytesByReference(appender));

View file

@ -4,6 +4,7 @@ import love.distributedrebirth.bassboonyd.BãßBȍőnAuthorInfoʸᴰ;
import love.distributedrebirth.numberxd.base2t.BaseAppenderOctal; import love.distributedrebirth.numberxd.base2t.BaseAppenderOctal;
import love.distributedrebirth.numberxd.base2t.BaseAppenderTyte; import love.distributedrebirth.numberxd.base2t.BaseAppenderTyte;
import love.distributedrebirth.numberxd.base2t.BaseIteratorOctal; import love.distributedrebirth.numberxd.base2t.BaseIteratorOctal;
import love.distributedrebirth.numberxd.base2t.BaseIteratorTyte;
import love.distributedrebirth.numberxd.base2t.BaseNumberTyteˣᴸ; import love.distributedrebirth.numberxd.base2t.BaseNumberTyteˣᴸ;
import love.distributedrebirth.numberxd.base2t.part.T02PartBinary; import love.distributedrebirth.numberxd.base2t.part.T02PartBinary;
@ -24,6 +25,10 @@ public class V0x000CA8ˣᴸ implements BaseNumberTyteˣᴸ<V0x000CA8ˣᴸ> {
this(new V0x000654ˣᴸ(values), new V0x000654ˣᴸ(values)); this(new V0x000654ˣᴸ(values), new V0x000654ˣᴸ(values));
} }
public V0x000CA8ˣᴸ(BaseIteratorTyte values) {
this(new V0x000654ˣᴸ(values), new V0x000654ˣᴸ(values));
}
private V0x000CA8ˣᴸ(V0x000654ˣᴸ valueHigh, V0x000654ˣᴸ valueLow) { private V0x000CA8ˣᴸ(V0x000654ˣᴸ valueHigh, V0x000654ˣᴸ valueLow) {
setValue(T02PartBinary.PART_1, valueHigh); setValue(T02PartBinary.PART_1, valueHigh);
setValue(T02PartBinary.PART_2, valueLow); setValue(T02PartBinary.PART_2, valueLow);
@ -51,7 +56,12 @@ public class V0x000CA8ˣᴸ implements BaseNumberTyteˣᴸ<V0x000CA8ˣᴸ> {
public void fillOctalsByClone(BaseAppenderOctal appender) { public void fillOctalsByClone(BaseAppenderOctal appender) {
T02PartBinary.PART_1.BãßVoorElk(v -> getValue(v).fillOctalsByClone(appender)); T02PartBinary.PART_1.BãßVoorElk(v -> getValue(v).fillOctalsByClone(appender));
} }
@Override
public V0x000CA8ˣᴸ toReference(BaseIteratorTyte values) {
return new V0x000CA8ˣᴸ(values);
}
@Override @Override
public void fillTytesByReference(BaseAppenderTyte appender) { public void fillTytesByReference(BaseAppenderTyte appender) {
T02PartBinary.PART_1.BãßVoorElk(v -> getValue(v).fillTytesByReference(appender)); T02PartBinary.PART_1.BãßVoorElk(v -> getValue(v).fillTytesByReference(appender));