diff options
| author | Benjamin J. Culkin <bjculkin@mix.wvu.edu> | 2021-07-12 15:53:22 -0300 |
|---|---|---|
| committer | Benjamin J. Culkin <bjculkin@mix.wvu.edu> | 2021-07-12 15:53:22 -0300 |
| commit | a24c1042499f76ff2d442ae133ef165011a7af4c (patch) | |
| tree | 1a0bdff895b7dc2bd9e8006fe3b83805c7e56f4f /base/src/main/java/bjc/utils/ioutils/blocks/Block.java | |
| parent | e55cb9852a106cff26517d7d1e85bc4b149884f3 (diff) | |
Formatting tweaks
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 | 58 |
1 files changed, 22 insertions, 36 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 b8c611b..313a91b 100644 --- a/base/src/main/java/bjc/utils/ioutils/blocks/Block.java +++ b/base/src/main/java/bjc/utils/ioutils/blocks/Block.java @@ -1,55 +1,38 @@ package bjc.utils.ioutils.blocks; -/** - * Represents a block of text read in from a source. +/** Represents a block of text read in from a source. * - * @author EVE - * - */ + * @author EVE */ public class Block { - /** - * The contents of this block. - */ + /** The contents of this block. */ public final String contents; - /** - * The line of the source this block started on. - */ + /** The line of the source this block started on. */ public final int startLine; - /** - * The line of the source this block ended on. - */ + /** The line of the source this block ended on. */ public final int endLine; - /** - * The number of this block. - */ + /** The number of this block. */ public final int blockNo; - /** - * The line offset number for this 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. - */ + * the BlockReader this Block is from. */ public int lineOffset; - /** - * Create a new block. + /** Create a new block. * - * @param blockNo - * The number of this block. - * @param contents - * The contents of this block. - * @param startLine - * The line this block started on. - * @param endLine - * The line this block ended. - */ - public Block(final int blockNo, final String contents, final int startLine, - final int endLine) { + * @param blockNo The number of this block. + * @param contents The contents of this block. + * @param startLine The line this block started on. + * @param endLine The line this block ended. */ + public Block( + final int blockNo, final String contents, final int startLine, + final int endLine) + { this.contents = contents; this.startLine = startLine; this.endLine = endLine; @@ -62,8 +45,11 @@ public class Block { 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, + contents.length()); } String fmt = "Block #%d (from lines %d to %d), length: %d characters"; |
