All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.yamcs.parameter.SInt64Value Maven / Gradle / Ivy

There is a newer version: 5.10.7
Show newest version
package org.yamcs.parameter;

import org.yamcs.protobuf.Yamcs.Value.Type;

public class SInt64Value extends Value {
    final long v;

    public SInt64Value(long v) {
        this.v = v;
    }

    @Override
    public Type getType() {
        return Type.SINT64;
    }

    @Override
    public long getSint64Value() {
        return v;
    }

    @Override
    public long toLong() {
        return v;
    }

    @Override
    public double toDouble() {
        return v;
    }

    @Override
    public int hashCode() {
        return Long.hashCode(v);
    }

    public boolean equals(Object obj) {
        if (obj instanceof SInt64Value) {
            return v == ((SInt64Value) obj).v;
        }
        return false;
    }

    @Override
    public String toString() {
        return Long.toString(v);
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy