add toString to cluster block

This commit is contained in:
kimchy 2010-11-09 15:41:47 +02:00
parent a0f4359ffa
commit 36bf5ee9fe
1 changed files with 9 additions and 0 deletions

View File

@ -104,6 +104,15 @@ public class ClusterBlock implements Serializable, Streamable, ToXContent {
} }
} }
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append(id).append(",").append(description).append(", blocks ");
for (ClusterBlockLevel level : levels) {
sb.append(level.name()).append(",");
}
return sb.toString();
}
@Override public boolean equals(Object o) { @Override public boolean equals(Object o) {
if (this == o) return true; if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false; if (o == null || getClass() != o.getClass()) return false;