summaryrefslogtreecommitdiff
path: root/base/src/main/java/bjc/utils/ioutils/blocks/Block.java
diff options
context:
space:
mode:
authorBen Culkin <scorpress@gmail.com>2020-04-13 18:40:41 -0400
committerBen Culkin <scorpress@gmail.com>2020-04-13 18:40:41 -0400
commitd4ca769e542b2489b1e23cfcbdc3a0b7275b87cd (patch)
tree1653a7399f97fb0c63ce62e3f60fd830d5c37f70 /base/src/main/java/bjc/utils/ioutils/blocks/Block.java
parent2ac2e31a56ae59ee582e43a90c3495f86dd9ee7a (diff)
Cleanup pass
Cleanup pass to uniformize things
Diffstat (limited to 'base/src/main/java/bjc/utils/ioutils/blocks/Block.java')
-rw-r--r--base/src/main/java/bjc/utils/ioutils/blocks/Block.java28
1 files changed, 15 insertions, 13 deletions
diff --git a/base/src/main/java/bjc/utils/ioutils/blocks/Block.java b/base/src/main/java/bjc/utils/ioutils/blocks/Block.java
index bf0257e..b8c611b 100644
--- a/base/src/main/java/bjc/utils/ioutils/blocks/Block.java
+++ b/base/src/main/java/bjc/utils/ioutils/blocks/Block.java
@@ -29,10 +29,10 @@ public class Block {
/**
* The line offset number for this block.
- *
- * Essentially, this is the absolute number of lines that this block is
- * into whatever source it came from, where as startLine and endLine are
- * relative to the BlockReader this Block is from.
+ *
+ * Essentially, this is the absolute number of lines that this block is into
+ * whatever source it came from, where as startLine and endLine are relative to
+ * the BlockReader this Block is from.
*/
public int lineOffset;
@@ -40,15 +40,16 @@ public class Block {
* Create a new block.
*
* @param blockNo
- * The number of this block.
+ * The number of this block.
* @param contents
- * The contents of this block.
+ * The contents of this block.
* @param startLine
- * The line this block started on.
+ * The line this block started on.
* @param endLine
- * The line this block ended.
+ * The line this block ended.
*/
- public Block(final int blockNo, final String contents, final int startLine, final int endLine) {
+ public Block(final int blockNo, final String contents, final int startLine,
+ final int endLine) {
this.contents = contents;
this.startLine = startLine;
this.endLine = endLine;
@@ -58,12 +59,13 @@ public class Block {
@Override
public String toString() {
if (lineOffset != -1) {
- String fmt = "Block #%d (from lines %d (%d) to %d (%d)), length: %d characters";
+ String fmt
+ = "Block #%d (from lines %d (%d) to %d (%d)), length: %d characters";
- return String.format(fmt, blockNo, startLine + lineOffset, startLine, endLine + lineOffset,
- endLine + lineOffset, contents.length());
+ return String.format(fmt, blockNo, startLine + lineOffset, startLine,
+ endLine + lineOffset, endLine + lineOffset, contents.length());
}
-
+
String fmt = "Block #%d (from lines %d to %d), length: %d characters";
return String.format(fmt, blockNo, startLine, endLine, contents.length());