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>> {
|
public interface BaseNumber<V extends BaseNumber<V>> {
|
||||||
|
|
||||||
|
int getBitCount();
|
||||||
|
|
||||||
|
default int getSliceAngle() {
|
||||||
|
return 360/getBitCount();
|
||||||
|
}
|
||||||
|
|
||||||
V toClone();
|
V toClone();
|
||||||
|
|
||||||
void fillOctalValues(T08PartOctalBaseAppender appender);
|
void fillOctalValues(T08PartOctalBaseAppender appender);
|
||||||
|
|
|
@ -15,6 +15,7 @@ public enum T08PartOctal implements BasePartIdentifierAlt, BasePartIdentifierTon
|
||||||
;
|
;
|
||||||
|
|
||||||
public static int LENGTH = 8;
|
public static int LENGTH = 8;
|
||||||
|
public static int BIT_COUNT = 3;
|
||||||
private static final byte BITMASK = 0x07;
|
private static final byte BITMASK = 0x07;
|
||||||
private final String identifier;
|
private final String identifier;
|
||||||
private final String identifierAlt; // absolute
|
private final String identifierAlt; // absolute
|
||||||
|
|
|
@ -24,6 +24,11 @@ public final class V003Timble implements BaseNumber<V003Timble> {
|
||||||
return value;
|
return value;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getBitCount() {
|
||||||
|
return T08PartOctal.BIT_COUNT;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public V003Timble toClone() {
|
public V003Timble toClone() {
|
||||||
return new V003Timble(getValue());
|
return new V003Timble(getValue());
|
||||||
|
|
|
@ -25,6 +25,11 @@ public final class V006Tixte implements BaseNumber<V006Tixte> {
|
||||||
values[part.ordinal()] = value;
|
values[part.ordinal()] = value;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getBitCount() {
|
||||||
|
return T08PartOctal.BIT_COUNT * T02PartBinary.LENGTH;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public V006Tixte toClone() {
|
public V006Tixte toClone() {
|
||||||
return new V006Tixte(cloneIterator());
|
return new V006Tixte(cloneIterator());
|
||||||
|
|
|
@ -30,6 +30,11 @@ public final class V009Tyte implements BaseNumberTyte<V009Tyte> {
|
||||||
values[part.ordinal()] = value;
|
values[part.ordinal()] = value;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getBitCount() {
|
||||||
|
return T08PartOctal.BIT_COUNT * T03PartTrit.LENGTH;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public V009Tyte toClone() {
|
public V009Tyte toClone() {
|
||||||
return new V009Tyte(cloneIterator());
|
return new V009Tyte(cloneIterator());
|
||||||
|
|
|
@ -37,6 +37,11 @@ public final class V018Tord implements BaseNumberTyte<V018Tord> {
|
||||||
getValue(part.splitPartBinary()).setValue(part.splitPartTrit(), value);;
|
getValue(part.splitPartBinary()).setValue(part.splitPartTrit(), value);;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getBitCount() {
|
||||||
|
return T08PartOctal.BIT_COUNT * T06PartSeximal.LENGTH;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public V018Tord toClone() {
|
public V018Tord toClone() {
|
||||||
return new V018Tord(cloneIterator());
|
return new V018Tord(cloneIterator());
|
||||||
|
|
|
@ -30,6 +30,11 @@ public final class V027Temvig implements BaseNumberTyte<V027Temvig> {
|
||||||
values[part.ordinal()] = value;
|
values[part.ordinal()] = value;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getBitCount() {
|
||||||
|
return T08PartOctal.BIT_COUNT * T03PartTrit.LENGTH * T03PartTrit.LENGTH;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public V027Temvig toClone() {
|
public V027Temvig toClone() {
|
||||||
return new V027Temvig(cloneIterator());
|
return new V027Temvig(cloneIterator());
|
||||||
|
|
|
@ -39,6 +39,11 @@ public final class V036Teger implements BaseNumberTyte<V036Teger> {
|
||||||
.setValue(part.splitPartBinary(T02PartBinary.PART_2), value);
|
.setValue(part.splitPartBinary(T02PartBinary.PART_2), value);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getBitCount() {
|
||||||
|
return T08PartOctal.BIT_COUNT * T12PartUncial.LENGTH;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public V036Teger toClone() {
|
public V036Teger toClone() {
|
||||||
return new V036Teger(cloneIterator());
|
return new V036Teger(cloneIterator());
|
||||||
|
|
|
@ -29,6 +29,11 @@ public final class V072Tong implements BaseNumberTyte<V072Tong> {
|
||||||
values[part.ordinal()] = value;
|
values[part.ordinal()] = value;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getBitCount() {
|
||||||
|
return T08PartOctal.BIT_COUNT * T12PartUncial.LENGTH * T02PartBinary.LENGTH;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public V072Tong toClone() {
|
public V072Tong toClone() {
|
||||||
return new V072Tong(cloneIterator());
|
return new V072Tong(cloneIterator());
|
||||||
|
|
|
@ -55,6 +55,11 @@ public final class V144Tocta implements BaseNumberTyte<V144Tocta> {
|
||||||
.setValue(part.splitPartBinary(T03PartTrit.PART_3), value);
|
.setValue(part.splitPartBinary(T03PartTrit.PART_3), value);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getBitCount() {
|
||||||
|
return T08PartOctal.BIT_COUNT * T12PartUncial.LENGTH * T04PartQuad.LENGTH;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public V144Tocta toClone() {
|
public V144Tocta toClone() {
|
||||||
return new V144Tocta(cloneIterator());
|
return new V144Tocta(cloneIterator());
|
||||||
|
|
Loading…
Reference in a new issue