Example #1
0
 /**
  * Default toString implementation for VNumber.
  *
  * @param vNumber the object
  * @return the string representation
  */
 public static String toString(VNumber vNumber) {
   StringBuilder builder = new StringBuilder();
   Class type = ValueUtil.typeOf(vNumber);
   builder.append(type.getSimpleName()).append('[').append(vNumber.getValue());
   appendAlarm(builder, vNumber);
   appendTime(builder, vNumber);
   builder.append(']');
   return builder.toString();
 }
Example #2
0
 /**
  * Default toString implementation for VString.
  *
  * @param vString the object
  * @return the string representation
  */
 public static String toString(VString vString) {
   StringBuilder builder = new StringBuilder();
   Class type = ValueUtil.typeOf(vString);
   builder.append(type.getSimpleName()).append("[").append(vString.getValue());
   appendAlarm(builder, vString);
   appendTime(builder, vString);
   builder.append(']');
   return builder.toString();
 }
Example #3
0
 /**
  * Default toString implementation for VEnumArray.
  *
  * @param vEnumArray the object
  * @return the string representation
  */
 public static String toString(VEnumArray vEnumArray) {
   StringBuilder builder = new StringBuilder();
   Class type = ValueUtil.typeOf(vEnumArray);
   builder.append(type.getSimpleName()).append("[");
   builder.append(format.format(vEnumArray));
   builder.append(", size ").append(vEnumArray.getData().size());
   appendAlarm(builder, vEnumArray);
   appendTime(builder, vEnumArray);
   builder.append(']');
   return builder.toString();
 }
Example #4
0
 /**
  * Default toString implementation for VEnum.
  *
  * @param vEnum the object
  * @return the string representation
  */
 public static String toString(VEnum vEnum) {
   StringBuilder builder = new StringBuilder();
   Class type = ValueUtil.typeOf(vEnum);
   builder
       .append(type.getSimpleName())
       .append("[")
       .append(vEnum.getValue())
       .append("(")
       .append(vEnum.getIndex())
       .append(")");
   appendAlarm(builder, vEnum);
   appendTime(builder, vEnum);
   builder.append(']');
   return builder.toString();
 }