diff options
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.java | 28 |
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()); |
