Permalink
Browse files

Rename methods in ObjectId and Timestamp.

Remove the get prefix from every getter-like method in the ObjectId and
Timestamp interfaces and change every other referencing class accordingly
(mostly for consistency).
  • Loading branch information...
1 parent 7b2f13c commit b4124477e0bcbb41d1a213e4f4ce9622332fe0b5 @kohanyirobert committed Jan 22, 2012
@@ -38,27 +38,27 @@
}
@Override
- public ByteBuffer getObjectId() {
+ public ByteBuffer objectId() {
return objectId.asReadOnlyBuffer();
}
@Override
- public ByteBuffer getTime() {
+ public ByteBuffer time() {
return time.asReadOnlyBuffer();
}
@Override
- public ByteBuffer getMachineId() {
+ public ByteBuffer machineId() {
return machineId.asReadOnlyBuffer();
}
@Override
- public ByteBuffer getProcessId() {
+ public ByteBuffer processId() {
return processId.asReadOnlyBuffer();
}
@Override
- public ByteBuffer getIncrement() {
+ public ByteBuffer increment() {
return increment.asReadOnlyBuffer();
}
@@ -71,7 +71,7 @@ public int hashCode() {
public boolean equals(Object object) {
if (object instanceof ObjectId) {
ObjectId other = (ObjectId) object;
- return objectId.equals(other.getObjectId());
+ return objectId.equals(other.objectId());
}
return false;
}
@@ -31,17 +31,17 @@
}
@Override
- public ByteBuffer getTimestamp() {
+ public ByteBuffer timestamp() {
return timestamp.asReadOnlyBuffer();
}
@Override
- public ByteBuffer getTime() {
+ public ByteBuffer time() {
return time.asReadOnlyBuffer();
}
@Override
- public ByteBuffer getIncrement() {
+ public ByteBuffer increment() {
return increment.asReadOnlyBuffer();
}
@@ -54,7 +54,7 @@ public int hashCode() {
public boolean equals(Object object) {
if (object instanceof Timestamp) {
Timestamp other = (Timestamp) object;
- return timestamp.equals(other.getTimestamp());
+ return timestamp.equals(other.timestamp());
}
return false;
}
@@ -108,7 +108,7 @@ public void writeTo(ByteBuffer buffer, Object reference) {
@Override
public void writeTo(ByteBuffer buffer, Object reference) {
- buffer.put(((ObjectId) reference).getObjectId());
+ buffer.put(((ObjectId) reference).objectId());
}
},
@@ -181,7 +181,7 @@ public void writeTo(ByteBuffer buffer, Object reference) {
@Override
public void writeTo(ByteBuffer buffer, Object reference) {
- buffer.put(((Timestamp) reference).getTimestamp());
+ buffer.put(((Timestamp) reference).timestamp());
}
},
@@ -5,13 +5,13 @@
// @checkstyle:off .
public interface ObjectId {
- ByteBuffer getObjectId();
+ ByteBuffer objectId();
- ByteBuffer getTime();
+ ByteBuffer time();
- ByteBuffer getMachineId();
+ ByteBuffer machineId();
- ByteBuffer getProcessId();
+ ByteBuffer processId();
- ByteBuffer getIncrement();
+ ByteBuffer increment();
}
@@ -5,9 +5,9 @@
// @checkstyle:off .
public interface Timestamp {
- ByteBuffer getTimestamp();
+ ByteBuffer timestamp();
- ByteBuffer getTime();
+ ByteBuffer time();
- ByteBuffer getIncrement();
+ ByteBuffer increment();
}

0 comments on commit b412447

Please sign in to comment.