Interface Type

All Superinterfaces:
FunctionArg, NullableType, ParameterizedType, TypeExpression
All Known Implementing Classes:
ImmutableType.Binary, ImmutableType.Bool, ImmutableType.Date, ImmutableType.Decimal, ImmutableType.FixedBinary, ImmutableType.FixedChar, ImmutableType.FP32, ImmutableType.FP64, ImmutableType.Func, ImmutableType.I16, ImmutableType.I32, ImmutableType.I64, ImmutableType.I8, ImmutableType.IntervalCompound, ImmutableType.IntervalDay, ImmutableType.IntervalYear, ImmutableType.ListType, ImmutableType.Map, ImmutableType.PrecisionTime, ImmutableType.PrecisionTimestamp, ImmutableType.PrecisionTimestampTZ, ImmutableType.Str, ImmutableType.Struct, ImmutableType.Time, ImmutableType.Timestamp, ImmutableType.TimestampTZ, ImmutableType.UserDefined, ImmutableType.UUID, ImmutableType.VarChar, Type.Binary, Type.Bool, Type.Date, Type.Decimal, Type.FixedBinary, Type.FixedChar, Type.FP32, Type.FP64, Type.Func, Type.I16, Type.I32, Type.I64, Type.I8, Type.IntervalCompound, Type.IntervalDay, Type.IntervalYear, Type.ListType, Type.Map, Type.PrecisionTime, Type.PrecisionTimestamp, Type.PrecisionTimestampTZ, Type.Str, Type.Struct, Type.Time, Type.Timestamp, Type.TimestampTZ, Type.UserDefined, Type.UUID, Type.VarChar

@Enclosing public interface Type extends TypeExpression, ParameterizedType, NullableType, FunctionArg
  • Method Details

    • withNullable

      Type withNullable(boolean nullable)
      Returns a copy of the Type with the specified nullability.

      This method is implemented by all concrete Type classes via Immutables code generation.

    • withNullability

      static TypeCreator withNullability(boolean nullable)
    • accept

      <R, E extends Throwable> R accept(TypeVisitor<R,E> typeVisitor) throws E
      Specified by:
      accept in interface ParameterizedType
      Specified by:
      accept in interface TypeExpression
      Throws:
      E extends Throwable
    • accept

      default <R, C extends VisitationContext, E extends Throwable> R accept(SimpleExtension.Function fnDef, int argIdx, FunctionArg.FuncArgVisitor<R,C,E> fnArgVisitor, C context) throws E
      Specified by:
      accept in interface FunctionArg
      Throws:
      E extends Throwable
    • equalsIgnoringNullability

      default boolean equalsIgnoringNullability(Type other)
      Compares this type with another type, ignoring nullability differences.
      Parameters:
      other - the type to compare with
      Returns:
      true if the types are equal when both are treated as nullable