1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20 package org.apache.directory.mavibot.btree;
21
22
23 import java.util.Arrays;
24
25
26
27
28
29
30
31 public class RevisionOffset
32 {
33
34 private long revision;
35
36
37 private long[] offsets;
38
39
40
41
42
43
44
45
46 public RevisionOffset( long revision, long[] offsets )
47 {
48 this.revision = revision;
49 this.offsets = offsets;
50 }
51
52
53 public long getRevision()
54 {
55 return revision;
56 }
57
58
59 void setRevision( long revision )
60 {
61 this.revision = revision;
62 }
63
64
65 public long[] getOffsets()
66 {
67 return offsets;
68 }
69
70
71 void setOffsets( long[] offsets )
72 {
73 this.offsets = offsets;
74 }
75
76
77 @Override
78 public int hashCode()
79 {
80 final int prime = 31;
81 int result = 1;
82 result = prime * result + ( int ) ( revision ^ ( revision >>> 32 ) );
83 return result;
84 }
85
86
87 @Override
88 public boolean equals( Object obj )
89 {
90 if ( this == obj )
91 {
92 return true;
93 }
94
95 if ( obj == null )
96 {
97 return false;
98 }
99
100 RevisionOffset other = ( RevisionOffset ) obj;
101
102 if ( revision != other.revision )
103 {
104 return false;
105 }
106
107 return true;
108 }
109
110
111 @Override
112 public String toString()
113 {
114 return "RevisionOffset [revision=" + revision + ", offsets=" + Arrays.toString( offsets ) + "]";
115 }
116
117 }