diff options
Diffstat (limited to 'vespajlib/src/main/java/com/yahoo/slime/LongValue.java')
-rw-r--r-- | vespajlib/src/main/java/com/yahoo/slime/LongValue.java | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/vespajlib/src/main/java/com/yahoo/slime/LongValue.java b/vespajlib/src/main/java/com/yahoo/slime/LongValue.java new file mode 100644 index 00000000000..fd423e178ec --- /dev/null +++ b/vespajlib/src/main/java/com/yahoo/slime/LongValue.java @@ -0,0 +1,11 @@ +// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +package com.yahoo.slime; + +final class LongValue extends Value { + private final long value; + public LongValue(long value) { this.value = value; } + public final Type type() { return Type.LONG; } + public final long asLong() { return this.value; } + public final double asDouble() { return (double)this.value; } + public final void accept(Visitor v) { v.visitLong(value); } +} |