### Eclipse Workspace Patch 1.0
#P sophie
|
|
|
|
| 1 | 1 | package org.sophie2.base.model.text.smart.position; |
| 2 | 2 | |
| | 3 | import org.sophie2.base.commons.util.Hash; |
| | 4 | import org.sophie2.base.commons.util.Hashable; |
| | 5 | import org.sophie2.base.commons.util.Hasher; |
| | 6 | |
| 3 | 7 | /** |
| 4 | 8 | * A class representing an interval in the text between two indexes. |
| 5 | 9 | * |
| 6 | 10 | * @author diana |
| 7 | 11 | */ |
| 8 | | public class HotIndexInterval { |
| | 12 | public class HotIndexInterval implements Hashable { |
| 9 | 13 | |
| 10 | 14 | private final int begin; |
| 11 | 15 | private final int end; |
| … |
… |
|
| 72 | 76 | } |
| 73 | 77 | return true; |
| 74 | 78 | } |
| | 79 | |
| | 80 | public Hash getHash() { |
| | 81 | Hasher hasher = new Hasher(); |
| | 82 | hasher.addInt(this.begin); |
| | 83 | hasher.addInt(this.end); |
| | 84 | return hasher.toHash(); |
| | 85 | } |
| 75 | 86 | |
| 76 | 87 | } |