io.deephaven.api.literal.LiteralByte 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 LiteralByte extends LiteralBase {
public static LiteralByte of(byte value) {
return ImmutableLiteralByte.of(value);
}
@Parameter
public abstract byte value();
@Override
public final T walk(Visitor visitor) {
return visitor.visit(value());
}
@Check
final void checkNotDeephavenNull() {
if (value() == QueryConstants.NULL_BYTE) {
throw new IllegalArgumentException(
"Can't represent QueryConstants.NULL_BYTE, is Deephaven null representation");
}
}
}