io.deephaven.api.literal.LiteralFloat Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of deephaven-table-api Show documentation
Show all versions of deephaven-table-api Show documentation
The Deephaven table operations API
The newest version!
//
// Copyright (c) 2016-2024 Deephaven Data Labs and Patent Pending
//
package io.deephaven.api.literal;
import io.deephaven.annotations.SimpleStyle;
import io.deephaven.util.QueryConstants;
import org.immutables.value.Value.Check;
import org.immutables.value.Value.Immutable;
import org.immutables.value.Value.Parameter;
@Immutable
@SimpleStyle
abstract class LiteralFloat extends LiteralBase {
public static LiteralFloat of(float value) {
return ImmutableLiteralFloat.of(value);
}
@Parameter
public abstract float value();
@Override
public final T walk(Visitor visitor) {
return visitor.visit(value());
}
@Check
final void checkNotDeephavenNull() {
if (value() == QueryConstants.NULL_FLOAT) {
throw new IllegalArgumentException(
"Can't represent QueryConstants.NULL_FLOAT, is Deephaven null representation");
}
}
}