toString method
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("Session(");
ret.write("session_id:");
ret.write(this.session_id);
ret.write(", ");
ret.write("create_time:");
ret.write(this.create_time);
ret.write(", ");
ret.write("update_time:");
ret.write(this.update_time);
ret.write(", ");
ret.write("user_name:");
if (this.user_name == null) {
ret.write("null");
} else {
ret.write("BINARY");
}
ret.write(", ");
ret.write("space_name:");
if (this.space_name == null) {
ret.write("null");
} else {
ret.write("BINARY");
}
ret.write(", ");
ret.write("graph_addr:");
if (this.graph_addr == null) {
ret.write("null");
} else {
ret.write(this.graph_addr);
}
ret.write(", ");
ret.write("timezone:");
ret.write(this.timezone);
ret.write(", ");
ret.write("client_ip:");
if (this.client_ip == null) {
ret.write("null");
} else {
ret.write("BINARY");
}
ret.write(", ");
ret.write("configs:");
if (this.configs == null) {
ret.write("null");
} else {
ret.write(this.configs);
}
ret.write(", ");
ret.write("queries:");
if (this.queries == null) {
ret.write("null");
} else {
ret.write(this.queries);
}
ret.write(")");
return ret.toString();
}