Added bit count and angle.
This commit is contained in:
parent
6cb6ba8c11
commit
0e059dc80a
|
@ -5,6 +5,12 @@ import java.util.List;
|
|||
|
||||
public interface BaseNumber<V extends BaseNumber<V>> {
|
||||
|
||||
int getBitCount();
|
||||
|
||||
default int getSliceAngle() {
|
||||
return 360/getBitCount();
|
||||
}
|
||||
|
||||
V toClone();
|
||||
|
||||
void fillOctalValues(T08PartOctalBaseAppender appender);
|
||||
|
|
|
@ -15,6 +15,7 @@ public enum T08PartOctal implements BasePartIdentifierAlt, BasePartIdentifierTon
|
|||
;
|
||||
|
||||
public static int LENGTH = 8;
|
||||
public static int BIT_COUNT = 3;
|
||||
private static final byte BITMASK = 0x07;
|
||||
private final String identifier;
|
||||
private final String identifierAlt; // absolute
|
||||
|
|
|
@ -24,6 +24,11 @@ public final class V003Timble implements BaseNumber<V003Timble> {
|
|||
return value;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getBitCount() {
|
||||
return T08PartOctal.BIT_COUNT;
|
||||
}
|
||||
|
||||
@Override
|
||||
public V003Timble toClone() {
|
||||
return new V003Timble(getValue());
|
||||
|
|
|
@ -24,12 +24,17 @@ public final class V006Tixte implements BaseNumber<V006Tixte> {
|
|||
public void setValue(T02PartBinary part, V003Timble value) {
|
||||
values[part.ordinal()] = value;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public int getBitCount() {
|
||||
return T08PartOctal.BIT_COUNT * T02PartBinary.LENGTH;
|
||||
}
|
||||
|
||||
@Override
|
||||
public V006Tixte toClone() {
|
||||
return new V006Tixte(cloneIterator());
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void fillOctalValues(T08PartOctalBaseAppender appender) {
|
||||
T02PartBinary.forEach(v -> getValue(v).fillOctalValues(appender));
|
||||
|
|
|
@ -30,6 +30,11 @@ public final class V009Tyte implements BaseNumberTyte<V009Tyte> {
|
|||
values[part.ordinal()] = value;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getBitCount() {
|
||||
return T08PartOctal.BIT_COUNT * T03PartTrit.LENGTH;
|
||||
}
|
||||
|
||||
@Override
|
||||
public V009Tyte toClone() {
|
||||
return new V009Tyte(cloneIterator());
|
||||
|
|
|
@ -37,6 +37,11 @@ public final class V018Tord implements BaseNumberTyte<V018Tord> {
|
|||
getValue(part.splitPartBinary()).setValue(part.splitPartTrit(), value);;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getBitCount() {
|
||||
return T08PartOctal.BIT_COUNT * T06PartSeximal.LENGTH;
|
||||
}
|
||||
|
||||
@Override
|
||||
public V018Tord toClone() {
|
||||
return new V018Tord(cloneIterator());
|
||||
|
|
|
@ -30,6 +30,11 @@ public final class V027Temvig implements BaseNumberTyte<V027Temvig> {
|
|||
values[part.ordinal()] = value;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getBitCount() {
|
||||
return T08PartOctal.BIT_COUNT * T03PartTrit.LENGTH * T03PartTrit.LENGTH;
|
||||
}
|
||||
|
||||
@Override
|
||||
public V027Temvig toClone() {
|
||||
return new V027Temvig(cloneIterator());
|
||||
|
|
|
@ -39,6 +39,11 @@ public final class V036Teger implements BaseNumberTyte<V036Teger> {
|
|||
.setValue(part.splitPartBinary(T02PartBinary.PART_2), value);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getBitCount() {
|
||||
return T08PartOctal.BIT_COUNT * T12PartUncial.LENGTH;
|
||||
}
|
||||
|
||||
@Override
|
||||
public V036Teger toClone() {
|
||||
return new V036Teger(cloneIterator());
|
||||
|
|
|
@ -29,6 +29,11 @@ public final class V072Tong implements BaseNumberTyte<V072Tong> {
|
|||
values[part.ordinal()] = value;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getBitCount() {
|
||||
return T08PartOctal.BIT_COUNT * T12PartUncial.LENGTH * T02PartBinary.LENGTH;
|
||||
}
|
||||
|
||||
@Override
|
||||
public V072Tong toClone() {
|
||||
return new V072Tong(cloneIterator());
|
||||
|
|
|
@ -55,6 +55,11 @@ public final class V144Tocta implements BaseNumberTyte<V144Tocta> {
|
|||
.setValue(part.splitPartBinary(T03PartTrit.PART_3), value);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getBitCount() {
|
||||
return T08PartOctal.BIT_COUNT * T12PartUncial.LENGTH * T04PartQuad.LENGTH;
|
||||
}
|
||||
|
||||
@Override
|
||||
public V144Tocta toClone() {
|
||||
return new V144Tocta(cloneIterator());
|
||||
|
|
Loading…
Reference in a new issue