Class ValueUtility


  • public class ValueUtility
    extends Object
    • Constructor Detail

      • ValueUtility

        public ValueUtility()
    • Method Detail

      • getUint32Value

        public static Value getUint32Value​(int x)
      • getSint32Value

        public static Value getSint32Value​(int x)
      • getUint64Value

        public static Value getUint64Value​(long x)
      • getSint64Value

        public static Value getSint64Value​(long x)
      • getStringValue

        public static Value getStringValue​(String x)
      • getBinaryValue

        public static Value getBinaryValue​(byte[] x)
      • getTimestampValue

        public static Value getTimestampValue​(long x)
      • getBooleanValue

        public static Value getBooleanValue​(boolean b)
      • getFloatValue

        public static Value getFloatValue​(float f)
      • getDoubleValue

        public static Value getDoubleValue​(double d)
      • getDoubleGbpValue

        public static org.yamcs.protobuf.Yamcs.Value getDoubleGbpValue​(double d)
      • getStringGbpValue

        public static org.yamcs.protobuf.Yamcs.Value getStringGbpValue​(String s)
      • getUint32GbpValue

        public static org.yamcs.protobuf.Yamcs.Value getUint32GbpValue​(int x)
      • getYarchValue

        public static Object getYarchValue​(Value v)
      • getYarchValue

        public static Object getYarchValue​(org.yamcs.protobuf.Yamcs.Value v)
      • getYarchType

        public static DataType getYarchType​(org.yamcs.protobuf.Yamcs.Value.Type type)
      • equals

        public static boolean equals​(Value a,
                                     Value b)
      • compare

        public static int compare​(Value a,
                                  Value b)
      • toGbp

        public static org.yamcs.protobuf.Yamcs.Value toGbp​(Value v)
      • toGbp

        public static org.yamcs.protobuf.Yamcs.AggregateValue toGbp​(AggregateValue v)
      • fromGpb

        public static Value fromGpb​(org.yamcs.protobuf.Yamcs.Value v)
      • processAsLong

        public static boolean processAsLong​(Value v,
                                            LongConsumer c)
        if the passed on value is INT32, SINT32, INT64 or SINT64, invoke the function on the long value and return true if v is of other types return false
        Parameters:
        v -
        c -
        Returns:
      • processAsDouble

        public static boolean processAsDouble​(Value v,
                                              DoubleConsumer c)
        if the passed on value is float, double or integer invoke the function on the double value and return true if v is of other types return false
        Parameters:
        v -
        c -
        Returns:
      • processAsDouble1

        public static boolean processAsDouble1​(Value v,
                                               DoubleConsumer c)
        if the passed on value is FLOAT or DOUBLE, invoke the function on the double value and return true if v is of other types return false
        Parameters:
        v -
        c -
        Returns:
      • getEnumeratedValue

        public static Value getEnumeratedValue​(long longValue,
                                               String stringValue)