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 = "©Δ∞ 仙上主天")
public interface BaseNumber<V extends BaseNumber<V>> {
static float CIRCLE_DEGREE = 360f;
int BãßBitCount();
default V toClone() {

View file

@ -12,6 +12,12 @@ import love.distributedrebirth.numberxd.base2t.type.V009Tyte;
@BãßBȍőnAuthorInfoʸᴰ(name = "willemtsade", copyright = "©Δ∞ 仙上主天")
public interface BaseNumberTyte<V extends BaseNumber<V>> extends BaseNumber<V> {
default V toReference() {
return toReference(iteratorTytesByReference());
}
V toReference(BaseIteratorTyte values);
void fillTytesByReference(BaseAppenderTyte appender);
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.BaseAppenderTyte;
import love.distributedrebirth.numberxd.base2t.BaseIteratorOctal;
import love.distributedrebirth.numberxd.base2t.BaseIteratorTyte;
import love.distributedrebirth.numberxd.base2t.BaseNumberTyte;
import love.distributedrebirth.numberxd.base2t.part.T03PartTrit;
import love.distributedrebirth.numberxd.base2t.part.T08PartOctal;
@ -70,6 +71,11 @@ public final class V009Tyte implements BaseNumberTyte<V009Tyte> {
appender.add(values[2]);
}
@Override
public V009Tyte toReference(BaseIteratorTyte values) {
return values.next();
}
@Override
public void fillTytesByReference(BaseAppenderTyte appender) {
appender.add(this);

View file

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

View file

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

View file

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

View file

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

View file

@ -87,6 +87,11 @@ public final class V144Tocta implements BaseNumberTyte<V144Tocta> {
T02PartBinary.PART_1.BãßVoorElk(v -> getValue(v).fillOctalsByClone(appender));
}
@Override
public V144Tocta toReference(BaseIteratorTyte values) {
return new V144Tocta(values);
}
@Override
public void fillTytesByReference(BaseAppenderTyte 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.BaseAppenderTyte;
import love.distributedrebirth.numberxd.base2t.BaseIteratorOctal;
import love.distributedrebirth.numberxd.base2t.BaseIteratorTyte;
import love.distributedrebirth.numberxd.base2t.BaseNumberTyteˣᴸ;
import love.distributedrebirth.numberxd.base2t.part.T60PartSexagesimal;
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) {
return values[part.ordinal()];
}
@ -52,6 +59,11 @@ public class V0x000654ˣᴸ implements BaseNumberTyteˣᴸ<V0x000654ˣᴸ> {
T60PartSexagesimal.PART_1.BãßVoorElk(v -> getValue(v).fillOctalsByClone(appender));
}
@Override
public V0x000654ˣᴸ toReference(BaseIteratorTyte values) {
return new V0x000654ˣᴸ(values);
}
@Override
public void fillTytesByReference(BaseAppenderTyte 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.BaseAppenderTyte;
import love.distributedrebirth.numberxd.base2t.BaseIteratorOctal;
import love.distributedrebirth.numberxd.base2t.BaseIteratorTyte;
import love.distributedrebirth.numberxd.base2t.BaseNumberTyteˣᴸ;
import love.distributedrebirth.numberxd.base2t.part.T02PartBinary;
@ -24,6 +25,10 @@ public class V0x000CA8ˣᴸ implements BaseNumberTyteˣᴸ<V0x000CA8ˣᴸ> {
this(new V0x000654ˣᴸ(values), new V0x000654ˣᴸ(values));
}
public V0x000CA8ˣᴸ(BaseIteratorTyte values) {
this(new V0x000654ˣᴸ(values), new V0x000654ˣᴸ(values));
}
private V0x000CA8ˣᴸ(V0x000654ˣᴸ valueHigh, V0x000654ˣᴸ valueLow) {
setValue(T02PartBinary.PART_1, valueHigh);
setValue(T02PartBinary.PART_2, valueLow);
@ -52,6 +57,11 @@ public class V0x000CA8ˣᴸ implements BaseNumberTyteˣᴸ<V0x000CA8ˣᴸ> {
T02PartBinary.PART_1.BãßVoorElk(v -> getValue(v).fillOctalsByClone(appender));
}
@Override
public V0x000CA8ˣᴸ toReference(BaseIteratorTyte values) {
return new V0x000CA8ˣᴸ(values);
}
@Override
public void fillTytesByReference(BaseAppenderTyte appender) {
T02PartBinary.PART_1.BãßVoorElk(v -> getValue(v).fillTytesByReference(appender));