Class Scalars

java.lang.Object
dev.vortex.api.proto.Scalars

public final class Scalars extends Object
Factory class for creating Vortex scalar values with their associated data types.

This class provides static factory methods to create ScalarProtos.Scalar instances for all supported Vortex data types. Each scalar consists of a value and its corresponding data type definition. The class supports both nullable and non-nullable variants for most types.

Factory methods follow a consistent naming pattern:

  • typeName(value) - Creates a non-nullable scalar with the given value
  • nullTypeName() - Creates a nullable scalar with a null value

Example usage:


 // Create a non-nullable integer
 ScalarProtos.Scalar intScalar = Scalars.int32(42);

 // Create a nullable string with null value
 ScalarProtos.Scalar nullString = Scalars.nullString();

 // Create a string with value
 ScalarProtos.Scalar stringScalar = Scalars.string("hello");