toString method

String toString()
override

A string representation of this object.

Some classes have a default textual representation, often paired with a static parse function (like int.parse). These classes will provide the textual representation as their string representation.

Other classes have no meaningful textual representation that a program will care about. Such classes will typically override toString to provide useful information when inspecting the object, mainly for debugging or logging.

Implementation

String toString() {
  StringBuffer ret = new StringBuffer("ID(");

  if (isSetSpace_id()) {
    ret.write("space_id:");
    ret.write(this.space_id);
  }

  if (isSetTag_id()) {
    ret.write(", ");
    ret.write("tag_id:");
    ret.write(this.tag_id);
  }

  if (isSetEdge_type()) {
    ret.write(", ");
    ret.write("edge_type:");
    ret.write(this.edge_type);
  }

  if (isSetIndex_id()) {
    ret.write(", ");
    ret.write("index_id:");
    ret.write(this.index_id);
  }

  if (isSetCluster_id()) {
    ret.write(", ");
    ret.write("cluster_id:");
    ret.write(this.cluster_id);
  }

  ret.write(")");

  return ret.toString();
}