コード例 #1
0
  /**
   * Return a readable string for testing or writing in the log file
   *
   * @return a readable string
   */
  public String getString() {
    String outMsg;

    outMsg = "LBSPLITDATA";
    outMsg += "\n\t Physical Sender:" + physicalSender.toString();
    outMsg += "\n\t Logical Sender:" + logicalSender.toString();
    outMsg += "\n\t Direction:" + direction;
    outMsg += "\n\t Min Value:" + minValue;
    outMsg += "\n\t Max Value:" + maxValue;
    outMsg += "\n\t Data:";
    for (int i = 0; i < data.size() - 1; i++) {
      outMsg += data.get(i) + " ";
    }
    outMsg += data.get(data.size() - 1);
    outMsg += "\n\t Logical Destination:" + logicalDestination.toString();

    return outMsg;
  }
コード例 #2
0
  @Override
  public String toString() {
    String outMsg;

    outMsg = "LBSPLITDATA";
    outMsg += ":" + physicalSender.toString();
    outMsg += ":" + logicalSender.toString();
    outMsg += ":" + direction;
    outMsg += ":" + minValue;
    outMsg += ":" + maxValue;
    outMsg += ":";
    for (int i = 0; i < data.size() - 1; i++) {
      outMsg += data.get(i) + "%";
    }
    outMsg += data.get(data.size() - 1);
    outMsg += ":" + logicalDestination.toString();

    return outMsg;
  }