diff --git a/engine/vector/src/main/java/io/deephaven/vector/ByteVector.java b/engine/vector/src/main/java/io/deephaven/vector/ByteVector.java index 707a961dedb..f7961720786 100644 --- a/engine/vector/src/main/java/io/deephaven/vector/ByteVector.java +++ b/engine/vector/src/main/java/io/deephaven/vector/ByteVector.java @@ -27,7 +27,7 @@ public interface ByteVector extends Vector, Iterable { long serialVersionUID = -1373264425081841175L; static PrimitiveVectorType type() { - return PrimitiveVectorType.of(ByteVector.class, ByteType.instance()); + return PrimitiveVectorType.of(ByteVector.class, ByteType.of()); } /** diff --git a/engine/vector/src/main/java/io/deephaven/vector/CharVector.java b/engine/vector/src/main/java/io/deephaven/vector/CharVector.java index 281dc8317a9..99c92c8c442 100644 --- a/engine/vector/src/main/java/io/deephaven/vector/CharVector.java +++ b/engine/vector/src/main/java/io/deephaven/vector/CharVector.java @@ -22,7 +22,7 @@ public interface CharVector extends Vector, Iterable { long serialVersionUID = -1373264425081841175L; static PrimitiveVectorType type() { - return PrimitiveVectorType.of(CharVector.class, CharType.instance()); + return PrimitiveVectorType.of(CharVector.class, CharType.of()); } /** diff --git a/engine/vector/src/main/java/io/deephaven/vector/DoubleVector.java b/engine/vector/src/main/java/io/deephaven/vector/DoubleVector.java index 778106d5bdd..3d5bc78641c 100644 --- a/engine/vector/src/main/java/io/deephaven/vector/DoubleVector.java +++ b/engine/vector/src/main/java/io/deephaven/vector/DoubleVector.java @@ -27,7 +27,7 @@ public interface DoubleVector extends Vector, Iterable { long serialVersionUID = -1373264425081841175L; static PrimitiveVectorType type() { - return PrimitiveVectorType.of(DoubleVector.class, DoubleType.instance()); + return PrimitiveVectorType.of(DoubleVector.class, DoubleType.of()); } /** diff --git a/engine/vector/src/main/java/io/deephaven/vector/FloatVector.java b/engine/vector/src/main/java/io/deephaven/vector/FloatVector.java index b8ed0e4e4d7..b1711d29183 100644 --- a/engine/vector/src/main/java/io/deephaven/vector/FloatVector.java +++ b/engine/vector/src/main/java/io/deephaven/vector/FloatVector.java @@ -27,7 +27,7 @@ public interface FloatVector extends Vector, Iterable { long serialVersionUID = -1373264425081841175L; static PrimitiveVectorType type() { - return PrimitiveVectorType.of(FloatVector.class, FloatType.instance()); + return PrimitiveVectorType.of(FloatVector.class, FloatType.of()); } /** diff --git a/engine/vector/src/main/java/io/deephaven/vector/IntVector.java b/engine/vector/src/main/java/io/deephaven/vector/IntVector.java index 3cc00051f46..783e42297ea 100644 --- a/engine/vector/src/main/java/io/deephaven/vector/IntVector.java +++ b/engine/vector/src/main/java/io/deephaven/vector/IntVector.java @@ -27,7 +27,7 @@ public interface IntVector extends Vector, Iterable { long serialVersionUID = -1373264425081841175L; static PrimitiveVectorType type() { - return PrimitiveVectorType.of(IntVector.class, IntType.instance()); + return PrimitiveVectorType.of(IntVector.class, IntType.of()); } /** diff --git a/engine/vector/src/main/java/io/deephaven/vector/LongVector.java b/engine/vector/src/main/java/io/deephaven/vector/LongVector.java index 9ff8617e29e..da0a75a6038 100644 --- a/engine/vector/src/main/java/io/deephaven/vector/LongVector.java +++ b/engine/vector/src/main/java/io/deephaven/vector/LongVector.java @@ -27,7 +27,7 @@ public interface LongVector extends Vector, Iterable { long serialVersionUID = -1373264425081841175L; static PrimitiveVectorType type() { - return PrimitiveVectorType.of(LongVector.class, LongType.instance()); + return PrimitiveVectorType.of(LongVector.class, LongType.of()); } /** diff --git a/engine/vector/src/main/java/io/deephaven/vector/ShortVector.java b/engine/vector/src/main/java/io/deephaven/vector/ShortVector.java index f06d1470e07..7a80d3a0736 100644 --- a/engine/vector/src/main/java/io/deephaven/vector/ShortVector.java +++ b/engine/vector/src/main/java/io/deephaven/vector/ShortVector.java @@ -27,7 +27,7 @@ public interface ShortVector extends Vector, Iterable { long serialVersionUID = -1373264425081841175L; static PrimitiveVectorType type() { - return PrimitiveVectorType.of(ShortVector.class, ShortType.instance()); + return PrimitiveVectorType.of(ShortVector.class, ShortType.of()); } /** diff --git a/engine/vector/src/test/java/io/deephaven/vector/ObjectVectorTest.java b/engine/vector/src/test/java/io/deephaven/vector/ObjectVectorTest.java index 3058c3c3fb0..27328264cb5 100644 --- a/engine/vector/src/test/java/io/deephaven/vector/ObjectVectorTest.java +++ b/engine/vector/src/test/java/io/deephaven/vector/ObjectVectorTest.java @@ -189,7 +189,7 @@ public void testSubVector() { @Test public void testType() { // region TestType - assertEquals(ObjectVector.type(io.deephaven.qst.type.StringType.instance()).clazz(), ObjectVector.class); + assertEquals(ObjectVector.type(io.deephaven.qst.type.StringType.of()).clazz(), ObjectVector.class); // endregion TestType } diff --git a/qst/src/main/java/io/deephaven/qst/array/BooleanArray.java b/qst/src/main/java/io/deephaven/qst/array/BooleanArray.java index 58b9569f31b..f898a91f0bf 100644 --- a/qst/src/main/java/io/deephaven/qst/array/BooleanArray.java +++ b/qst/src/main/java/io/deephaven/qst/array/BooleanArray.java @@ -79,7 +79,7 @@ public final int size() { @Override public final BooleanType componentType() { - return BooleanType.instance(); + return BooleanType.of(); } @Override diff --git a/qst/src/main/java/io/deephaven/qst/array/ByteArray.java b/qst/src/main/java/io/deephaven/qst/array/ByteArray.java index 958ccf09b72..5294f2ffa27 100644 --- a/qst/src/main/java/io/deephaven/qst/array/ByteArray.java +++ b/qst/src/main/java/io/deephaven/qst/array/ByteArray.java @@ -79,7 +79,7 @@ public final int size() { @Override public final ByteType componentType() { - return ByteType.instance(); + return ByteType.of(); } @Override diff --git a/qst/src/main/java/io/deephaven/qst/array/CharArray.java b/qst/src/main/java/io/deephaven/qst/array/CharArray.java index 001ada29380..fc5011dcab3 100644 --- a/qst/src/main/java/io/deephaven/qst/array/CharArray.java +++ b/qst/src/main/java/io/deephaven/qst/array/CharArray.java @@ -79,7 +79,7 @@ public final int size() { @Override public final CharType componentType() { - return CharType.instance(); + return CharType.of(); } @Override diff --git a/qst/src/main/java/io/deephaven/qst/array/DoubleArray.java b/qst/src/main/java/io/deephaven/qst/array/DoubleArray.java index d3ae7036b0b..5dd3a63857c 100644 --- a/qst/src/main/java/io/deephaven/qst/array/DoubleArray.java +++ b/qst/src/main/java/io/deephaven/qst/array/DoubleArray.java @@ -79,7 +79,7 @@ public final int size() { @Override public final DoubleType componentType() { - return DoubleType.instance(); + return DoubleType.of(); } @Override diff --git a/qst/src/main/java/io/deephaven/qst/array/FloatArray.java b/qst/src/main/java/io/deephaven/qst/array/FloatArray.java index 1ce5e9d545a..d7882df60f4 100644 --- a/qst/src/main/java/io/deephaven/qst/array/FloatArray.java +++ b/qst/src/main/java/io/deephaven/qst/array/FloatArray.java @@ -79,7 +79,7 @@ public final int size() { @Override public final FloatType componentType() { - return FloatType.instance(); + return FloatType.of(); } @Override diff --git a/qst/src/main/java/io/deephaven/qst/array/IntArray.java b/qst/src/main/java/io/deephaven/qst/array/IntArray.java index 54efdce5961..84e0d5d93ea 100644 --- a/qst/src/main/java/io/deephaven/qst/array/IntArray.java +++ b/qst/src/main/java/io/deephaven/qst/array/IntArray.java @@ -79,7 +79,7 @@ public final int size() { @Override public final IntType componentType() { - return IntType.instance(); + return IntType.of(); } @Override diff --git a/qst/src/main/java/io/deephaven/qst/array/LongArray.java b/qst/src/main/java/io/deephaven/qst/array/LongArray.java index 6887cab90ee..c341d1eb4c2 100644 --- a/qst/src/main/java/io/deephaven/qst/array/LongArray.java +++ b/qst/src/main/java/io/deephaven/qst/array/LongArray.java @@ -79,7 +79,7 @@ public final int size() { @Override public final LongType componentType() { - return LongType.instance(); + return LongType.of(); } @Override diff --git a/qst/src/main/java/io/deephaven/qst/array/ShortArray.java b/qst/src/main/java/io/deephaven/qst/array/ShortArray.java index 8df793a7bc6..a4485de9a26 100644 --- a/qst/src/main/java/io/deephaven/qst/array/ShortArray.java +++ b/qst/src/main/java/io/deephaven/qst/array/ShortArray.java @@ -79,7 +79,7 @@ public final int size() { @Override public final ShortType componentType() { - return ShortType.instance(); + return ShortType.of(); } @Override diff --git a/qst/src/main/java/io/deephaven/qst/type/BooleanType.java b/qst/src/main/java/io/deephaven/qst/type/BooleanType.java index ea897da0eab..4f5353b54ae 100644 --- a/qst/src/main/java/io/deephaven/qst/type/BooleanType.java +++ b/qst/src/main/java/io/deephaven/qst/type/BooleanType.java @@ -13,7 +13,7 @@ @SingletonStyle public abstract class BooleanType extends PrimitiveTypeBase { - public static BooleanType instance() { + public static BooleanType of() { return ImmutableBooleanType.of(); } diff --git a/qst/src/main/java/io/deephaven/qst/type/BoxedBooleanType.java b/qst/src/main/java/io/deephaven/qst/type/BoxedBooleanType.java index 8ae9df54752..cd5f84baade 100644 --- a/qst/src/main/java/io/deephaven/qst/type/BoxedBooleanType.java +++ b/qst/src/main/java/io/deephaven/qst/type/BoxedBooleanType.java @@ -4,7 +4,6 @@ package io.deephaven.qst.type; import io.deephaven.annotations.SingletonStyle; -import io.deephaven.qst.type.BoxedType.Visitor; import org.immutables.value.Value.Immutable; /** @@ -25,7 +24,7 @@ public final Class clazz() { @Override public final BooleanType primitiveType() { - return BooleanType.instance(); + return BooleanType.of(); } @Override diff --git a/qst/src/main/java/io/deephaven/qst/type/BoxedByteType.java b/qst/src/main/java/io/deephaven/qst/type/BoxedByteType.java index af4a574f50d..7cbb5b05c2b 100644 --- a/qst/src/main/java/io/deephaven/qst/type/BoxedByteType.java +++ b/qst/src/main/java/io/deephaven/qst/type/BoxedByteType.java @@ -24,7 +24,7 @@ public final Class clazz() { @Override public final ByteType primitiveType() { - return ByteType.instance(); + return ByteType.of(); } @Override diff --git a/qst/src/main/java/io/deephaven/qst/type/BoxedCharType.java b/qst/src/main/java/io/deephaven/qst/type/BoxedCharType.java index fb20125faa5..e1cca0be428 100644 --- a/qst/src/main/java/io/deephaven/qst/type/BoxedCharType.java +++ b/qst/src/main/java/io/deephaven/qst/type/BoxedCharType.java @@ -24,7 +24,7 @@ public final Class clazz() { @Override public final CharType primitiveType() { - return CharType.instance(); + return CharType.of(); } @Override diff --git a/qst/src/main/java/io/deephaven/qst/type/BoxedDoubleType.java b/qst/src/main/java/io/deephaven/qst/type/BoxedDoubleType.java index 20186fa91bf..cf3c7cdf3c8 100644 --- a/qst/src/main/java/io/deephaven/qst/type/BoxedDoubleType.java +++ b/qst/src/main/java/io/deephaven/qst/type/BoxedDoubleType.java @@ -24,7 +24,7 @@ public final Class clazz() { @Override public final DoubleType primitiveType() { - return DoubleType.instance(); + return DoubleType.of(); } @Override diff --git a/qst/src/main/java/io/deephaven/qst/type/BoxedFloatType.java b/qst/src/main/java/io/deephaven/qst/type/BoxedFloatType.java index e0061f80aa3..01c4256d428 100644 --- a/qst/src/main/java/io/deephaven/qst/type/BoxedFloatType.java +++ b/qst/src/main/java/io/deephaven/qst/type/BoxedFloatType.java @@ -24,7 +24,7 @@ public final Class clazz() { @Override public final FloatType primitiveType() { - return FloatType.instance(); + return FloatType.of(); } @Override diff --git a/qst/src/main/java/io/deephaven/qst/type/BoxedIntType.java b/qst/src/main/java/io/deephaven/qst/type/BoxedIntType.java index 8a08485d544..08a0a35b650 100644 --- a/qst/src/main/java/io/deephaven/qst/type/BoxedIntType.java +++ b/qst/src/main/java/io/deephaven/qst/type/BoxedIntType.java @@ -24,7 +24,7 @@ public final Class clazz() { @Override public final IntType primitiveType() { - return IntType.instance(); + return IntType.of(); } @Override diff --git a/qst/src/main/java/io/deephaven/qst/type/BoxedLongType.java b/qst/src/main/java/io/deephaven/qst/type/BoxedLongType.java index 108d1e17e4e..e58537dd439 100644 --- a/qst/src/main/java/io/deephaven/qst/type/BoxedLongType.java +++ b/qst/src/main/java/io/deephaven/qst/type/BoxedLongType.java @@ -24,7 +24,7 @@ public final Class clazz() { @Override public final LongType primitiveType() { - return LongType.instance(); + return LongType.of(); } @Override diff --git a/qst/src/main/java/io/deephaven/qst/type/BoxedShortType.java b/qst/src/main/java/io/deephaven/qst/type/BoxedShortType.java index 5ed3009e9b3..0237ea504c8 100644 --- a/qst/src/main/java/io/deephaven/qst/type/BoxedShortType.java +++ b/qst/src/main/java/io/deephaven/qst/type/BoxedShortType.java @@ -24,7 +24,7 @@ public final Class clazz() { @Override public final ShortType primitiveType() { - return ShortType.instance(); + return ShortType.of(); } @Override diff --git a/qst/src/main/java/io/deephaven/qst/type/BoxedType.java b/qst/src/main/java/io/deephaven/qst/type/BoxedType.java index 1de27d98c04..5ad6a6e1e6e 100644 --- a/qst/src/main/java/io/deephaven/qst/type/BoxedType.java +++ b/qst/src/main/java/io/deephaven/qst/type/BoxedType.java @@ -37,9 +37,6 @@ static Stream> instances() { R walk(Visitor visitor); interface Visitor { - static Visitor adapt(PrimitiveType.Visitor visitor) { - return new BoxedTypeVisitorAdapter<>(visitor); - } R visit(BoxedBooleanType booleanType); diff --git a/qst/src/main/java/io/deephaven/qst/type/BoxedTypeVisitorAdapter.java b/qst/src/main/java/io/deephaven/qst/type/BoxedTypeVisitorAdapter.java deleted file mode 100644 index ed44ff67c89..00000000000 --- a/qst/src/main/java/io/deephaven/qst/type/BoxedTypeVisitorAdapter.java +++ /dev/null @@ -1,53 +0,0 @@ -package io.deephaven.qst.type; - -import io.deephaven.qst.type.PrimitiveType.Visitor; - -import java.util.Objects; - -class BoxedTypeVisitorAdapter implements BoxedType.Visitor { - private final PrimitiveType.Visitor delegate; - - public BoxedTypeVisitorAdapter(Visitor delegate) { - this.delegate = Objects.requireNonNull(delegate); - } - - @Override - public R visit(BoxedBooleanType booleanType) { - return delegate.visit(booleanType.primitiveType()); - } - - @Override - public R visit(BoxedByteType byteType) { - return delegate.visit(byteType.primitiveType()); - } - - @Override - public R visit(BoxedCharType charType) { - return delegate.visit(charType.primitiveType()); - } - - @Override - public R visit(BoxedShortType shortType) { - return delegate.visit(shortType.primitiveType()); - } - - @Override - public R visit(BoxedIntType intType) { - return delegate.visit(intType.primitiveType()); - } - - @Override - public R visit(BoxedLongType longType) { - return delegate.visit(longType.primitiveType()); - } - - @Override - public R visit(BoxedFloatType floatType) { - return delegate.visit(floatType.primitiveType()); - } - - @Override - public R visit(BoxedDoubleType doubleType) { - return delegate.visit(doubleType.primitiveType()); - } -} diff --git a/qst/src/main/java/io/deephaven/qst/type/ByteType.java b/qst/src/main/java/io/deephaven/qst/type/ByteType.java index 658c0ac2d87..eeb4c84d751 100644 --- a/qst/src/main/java/io/deephaven/qst/type/ByteType.java +++ b/qst/src/main/java/io/deephaven/qst/type/ByteType.java @@ -13,7 +13,7 @@ @SingletonStyle public abstract class ByteType extends PrimitiveTypeBase { - public static ByteType instance() { + public static ByteType of() { return ImmutableByteType.of(); } diff --git a/qst/src/main/java/io/deephaven/qst/type/CharType.java b/qst/src/main/java/io/deephaven/qst/type/CharType.java index bd7c9be1647..a0fc2ea6e75 100644 --- a/qst/src/main/java/io/deephaven/qst/type/CharType.java +++ b/qst/src/main/java/io/deephaven/qst/type/CharType.java @@ -13,7 +13,7 @@ @SingletonStyle public abstract class CharType extends PrimitiveTypeBase { - public static CharType instance() { + public static CharType of() { return ImmutableCharType.of(); } diff --git a/qst/src/main/java/io/deephaven/qst/type/DoubleType.java b/qst/src/main/java/io/deephaven/qst/type/DoubleType.java index 33a0f838a18..750dbf8cab1 100644 --- a/qst/src/main/java/io/deephaven/qst/type/DoubleType.java +++ b/qst/src/main/java/io/deephaven/qst/type/DoubleType.java @@ -13,7 +13,7 @@ @SingletonStyle public abstract class DoubleType extends PrimitiveTypeBase { - public static DoubleType instance() { + public static DoubleType of() { return ImmutableDoubleType.of(); } diff --git a/qst/src/main/java/io/deephaven/qst/type/FloatType.java b/qst/src/main/java/io/deephaven/qst/type/FloatType.java index a2f48e07dab..46bc5588adf 100644 --- a/qst/src/main/java/io/deephaven/qst/type/FloatType.java +++ b/qst/src/main/java/io/deephaven/qst/type/FloatType.java @@ -13,7 +13,7 @@ @SingletonStyle public abstract class FloatType extends PrimitiveTypeBase { - public static FloatType instance() { + public static FloatType of() { return ImmutableFloatType.of(); } diff --git a/qst/src/main/java/io/deephaven/qst/type/InstantType.java b/qst/src/main/java/io/deephaven/qst/type/InstantType.java index fbddeb436ef..622c3de2780 100644 --- a/qst/src/main/java/io/deephaven/qst/type/InstantType.java +++ b/qst/src/main/java/io/deephaven/qst/type/InstantType.java @@ -15,7 +15,7 @@ @SingletonStyle public abstract class InstantType extends GenericTypeBase { - public static InstantType instance() { + public static InstantType of() { return ImmutableInstantType.of(); } diff --git a/qst/src/main/java/io/deephaven/qst/type/IntType.java b/qst/src/main/java/io/deephaven/qst/type/IntType.java index a2066e6c07d..626c8fedfce 100644 --- a/qst/src/main/java/io/deephaven/qst/type/IntType.java +++ b/qst/src/main/java/io/deephaven/qst/type/IntType.java @@ -13,7 +13,7 @@ @SingletonStyle public abstract class IntType extends PrimitiveTypeBase { - public static IntType instance() { + public static IntType of() { return ImmutableIntType.of(); } diff --git a/qst/src/main/java/io/deephaven/qst/type/LongType.java b/qst/src/main/java/io/deephaven/qst/type/LongType.java index 8d3fa9d23f6..664a72f3175 100644 --- a/qst/src/main/java/io/deephaven/qst/type/LongType.java +++ b/qst/src/main/java/io/deephaven/qst/type/LongType.java @@ -13,7 +13,7 @@ @SingletonStyle public abstract class LongType extends PrimitiveTypeBase { - public static LongType instance() { + public static LongType of() { return ImmutableLongType.of(); } diff --git a/qst/src/main/java/io/deephaven/qst/type/PrimitiveType.java b/qst/src/main/java/io/deephaven/qst/type/PrimitiveType.java index 33012423b29..8b372fa6f08 100644 --- a/qst/src/main/java/io/deephaven/qst/type/PrimitiveType.java +++ b/qst/src/main/java/io/deephaven/qst/type/PrimitiveType.java @@ -22,14 +22,14 @@ public interface PrimitiveType extends Type { static Stream> instances() { return Stream.of( - BooleanType.instance(), - ByteType.instance(), - CharType.instance(), - ShortType.instance(), - IntType.instance(), - LongType.instance(), - FloatType.instance(), - DoubleType.instance()); + BooleanType.of(), + ByteType.of(), + CharType.of(), + ShortType.of(), + IntType.of(), + LongType.of(), + FloatType.of(), + DoubleType.of()); } BoxedType boxedType(); @@ -37,9 +37,6 @@ static Stream> instances() { R walk(Visitor visitor); interface Visitor { - static Visitor adapt(BoxedType.Visitor visitor) { - return new PrimitiveTypeVisitorAdapter<>(visitor); - } R visit(BooleanType booleanType); diff --git a/qst/src/main/java/io/deephaven/qst/type/PrimitiveTypeVisitorAdapter.java b/qst/src/main/java/io/deephaven/qst/type/PrimitiveTypeVisitorAdapter.java deleted file mode 100644 index 007bde9a2a7..00000000000 --- a/qst/src/main/java/io/deephaven/qst/type/PrimitiveTypeVisitorAdapter.java +++ /dev/null @@ -1,53 +0,0 @@ -package io.deephaven.qst.type; - -import io.deephaven.qst.type.BoxedType.Visitor; - -import java.util.Objects; - -class PrimitiveTypeVisitorAdapter implements PrimitiveType.Visitor { - private final BoxedType.Visitor delegate; - - public PrimitiveTypeVisitorAdapter(Visitor delegate) { - this.delegate = Objects.requireNonNull(delegate); - } - - @Override - public R visit(BooleanType booleanType) { - return delegate.visit(booleanType.boxedType()); - } - - @Override - public R visit(ByteType byteType) { - return delegate.visit(byteType.boxedType()); - } - - @Override - public R visit(CharType charType) { - return delegate.visit(charType.boxedType()); - } - - @Override - public R visit(ShortType shortType) { - return delegate.visit(shortType.boxedType()); - } - - @Override - public R visit(IntType intType) { - return delegate.visit(intType.boxedType()); - } - - @Override - public R visit(LongType longType) { - return delegate.visit(longType.boxedType()); - } - - @Override - public R visit(FloatType floatType) { - return delegate.visit(floatType.boxedType()); - } - - @Override - public R visit(DoubleType doubleType) { - return delegate.visit(doubleType.boxedType()); - } -} diff --git a/qst/src/main/java/io/deephaven/qst/type/ShortType.java b/qst/src/main/java/io/deephaven/qst/type/ShortType.java index 616531a3cd3..5cba26941b5 100644 --- a/qst/src/main/java/io/deephaven/qst/type/ShortType.java +++ b/qst/src/main/java/io/deephaven/qst/type/ShortType.java @@ -13,7 +13,7 @@ @SingletonStyle public abstract class ShortType extends PrimitiveTypeBase { - public static ShortType instance() { + public static ShortType of() { return ImmutableShortType.of(); } diff --git a/qst/src/main/java/io/deephaven/qst/type/StringType.java b/qst/src/main/java/io/deephaven/qst/type/StringType.java index f63a90e0236..2102a8c1258 100644 --- a/qst/src/main/java/io/deephaven/qst/type/StringType.java +++ b/qst/src/main/java/io/deephaven/qst/type/StringType.java @@ -13,7 +13,7 @@ @SingletonStyle public abstract class StringType extends GenericTypeBase { - public static StringType instance() { + public static StringType of() { return ImmutableStringType.of(); } diff --git a/qst/src/main/java/io/deephaven/qst/type/Type.java b/qst/src/main/java/io/deephaven/qst/type/Type.java index d648b25a8f8..f3f70258792 100644 --- a/qst/src/main/java/io/deephaven/qst/type/Type.java +++ b/qst/src/main/java/io/deephaven/qst/type/Type.java @@ -50,7 +50,7 @@ static List> knownTypes() { * @return the boolean type */ static BooleanType booleanType() { - return BooleanType.instance(); + return BooleanType.of(); } /** @@ -59,7 +59,7 @@ static BooleanType booleanType() { * @return the byte type */ static ByteType byteType() { - return ByteType.instance(); + return ByteType.of(); } /** @@ -68,7 +68,7 @@ static ByteType byteType() { * @return the char type */ static CharType charType() { - return CharType.instance(); + return CharType.of(); } /** @@ -77,7 +77,7 @@ static CharType charType() { * @return the short type */ static ShortType shortType() { - return ShortType.instance(); + return ShortType.of(); } /** @@ -86,7 +86,7 @@ static ShortType shortType() { * @return the int type */ static IntType intType() { - return IntType.instance(); + return IntType.of(); } /** @@ -95,7 +95,7 @@ static IntType intType() { * @return the long type */ static LongType longType() { - return LongType.instance(); + return LongType.of(); } /** @@ -104,7 +104,7 @@ static LongType longType() { * @return the float type */ static FloatType floatType() { - return FloatType.instance(); + return FloatType.of(); } /** @@ -113,7 +113,7 @@ static FloatType floatType() { * @return the double type */ static DoubleType doubleType() { - return DoubleType.instance(); + return DoubleType.of(); } /** @@ -122,7 +122,7 @@ static DoubleType doubleType() { * @return the string type */ static StringType stringType() { - return StringType.instance(); + return StringType.of(); } /** @@ -131,7 +131,7 @@ static StringType stringType() { * @return the instant type */ static InstantType instantType() { - return InstantType.instance(); + return InstantType.of(); } /** diff --git a/qst/src/main/java/io/deephaven/qst/type/TypeHelper.java b/qst/src/main/java/io/deephaven/qst/type/TypeHelper.java index d366798e7bf..fcbb1e9de2c 100644 --- a/qst/src/main/java/io/deephaven/qst/type/TypeHelper.java +++ b/qst/src/main/java/io/deephaven/qst/type/TypeHelper.java @@ -32,7 +32,7 @@ static List> knownTypes() { static Stream> genericTypes() { return Stream.of( BoxedType.instances(), - Stream.of(StringType.instance(), InstantType.instance()), + Stream.of(StringType.of(), InstantType.of()), primitiveVectorTypes()) .flatMap(Function.identity()); } diff --git a/qst/src/test/java/io/deephaven/qst/column/header/ColumnHeadersTest.java b/qst/src/test/java/io/deephaven/qst/column/header/ColumnHeadersTest.java index 4948a6ca7ea..a628c1b7272 100644 --- a/qst/src/test/java/io/deephaven/qst/column/header/ColumnHeadersTest.java +++ b/qst/src/test/java/io/deephaven/qst/column/header/ColumnHeadersTest.java @@ -62,8 +62,8 @@ void h11Table() { Column.of("Long", LongArray.ofUnsafe(31337L)), Column.of("Float", FloatArray.ofUnsafe(3.14f)), Column.of("Double", DoubleArray.ofUnsafe(99.99)), - Column.of("String", GenericArray.of(StringType.instance(), "foobar")), - Column.of("Instant", GenericArray.of(InstantType.instance(), Instant.ofEpochMilli(0))), + Column.of("String", GenericArray.of(StringType.of(), "foobar")), + Column.of("Instant", GenericArray.of(InstantType.of(), Instant.ofEpochMilli(0))), Column.of("Custom", GenericArray.of(CustomType.of(Custom.class), Custom.A))); // @formatter:on