Mercurial > jhg
comparison src/org/tmatesoft/hg/internal/diff/LineImpl.java @ 703:7839ff0bfd78
Refactor: move diff/blame related code to a separate package
| author | Artem Tikhomirov <tikhomirov.artem@gmail.com> |
|---|---|
| date | Wed, 14 Aug 2013 14:51:51 +0200 |
| parents | src/org/tmatesoft/hg/internal/LineImpl.java@1c49c0cee540 |
| children |
comparison
equal
deleted
inserted
replaced
| 702:992fa84e7885 | 703:7839ff0bfd78 |
|---|---|
| 1 /* | |
| 2 * Copyright (c) 2013 TMate Software Ltd | |
| 3 * | |
| 4 * This program is free software; you can redistribute it and/or modify | |
| 5 * it under the terms of the GNU General Public License as published by | |
| 6 * the Free Software Foundation; version 2 of the License. | |
| 7 * | |
| 8 * This program is distributed in the hope that it will be useful, | |
| 9 * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
| 10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
| 11 * GNU General Public License for more details. | |
| 12 * | |
| 13 * For information on how to redistribute this software under | |
| 14 * the terms of a license other than GNU General Public License | |
| 15 * contact TMate Software at support@hg4j.com | |
| 16 */ | |
| 17 package org.tmatesoft.hg.internal.diff; | |
| 18 | |
| 19 import org.tmatesoft.hg.core.HgAnnotateCommand.LineInfo; | |
| 20 | |
| 21 /** | |
| 22 * @author Artem Tikhomirov | |
| 23 * @author TMate Software Ltd. | |
| 24 */ | |
| 25 final class LineImpl implements LineInfo { | |
| 26 private int ln; | |
| 27 private int origLine; | |
| 28 private int rev; | |
| 29 private byte[] content; | |
| 30 | |
| 31 void init(int line, int firstAppearance, int csetRev, byte[] cnt) { | |
| 32 ln = line; | |
| 33 origLine = firstAppearance; | |
| 34 rev = csetRev; | |
| 35 content = cnt; | |
| 36 } | |
| 37 | |
| 38 public int getLineNumber() { | |
| 39 return ln; | |
| 40 } | |
| 41 | |
| 42 | |
| 43 public int getOriginLineNumber() { | |
| 44 return origLine; | |
| 45 } | |
| 46 | |
| 47 public int getChangesetIndex() { | |
| 48 return rev; | |
| 49 } | |
| 50 | |
| 51 public byte[] getContent() { | |
| 52 return content; | |
| 53 } | |
| 54 } |
