|
@@ -152,11 +152,22 @@ public class Block implements Writable, Comparable<Block> {
|
|
|
generationStamp = stamp;
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * A helper method to output the string representation of the Block portion of
|
|
|
+ * a derived class' instance.
|
|
|
+ *
|
|
|
+ * @param b the target object
|
|
|
+ * @return the string representation of the block
|
|
|
+ */
|
|
|
+ public static String toString(final Block b) {
|
|
|
+ return b.getBlockName() + "_" + b.getGenerationStamp();
|
|
|
+ }
|
|
|
+
|
|
|
/**
|
|
|
*/
|
|
|
@Override
|
|
|
public String toString() {
|
|
|
- return getBlockName() + "_" + getGenerationStamp();
|
|
|
+ return toString(this);
|
|
|
}
|
|
|
|
|
|
public void appendStringTo(StringBuilder sb) {
|