Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
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...
commit b4124477e0bcbb41d1a213e4f4ce9622332fe0b5 1 parent 7b2f13c
@kohanyirobert authored
View
12 src/main/java/com/github/kohanyirobert/ebson/BasicObjectId.java
@@ -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;
}
View
8 src/main/java/com/github/kohanyirobert/ebson/BasicTimestamp.java
@@ -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;
}
View
4 src/main/java/com/github/kohanyirobert/ebson/DefaultWriter.java
@@ -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());
}
},
View
10 src/main/java/com/github/kohanyirobert/ebson/ObjectId.java
@@ -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();
}
View
6 src/main/java/com/github/kohanyirobert/ebson/Timestamp.java
@@ -5,9 +5,9 @@
// @checkstyle:off .
public interface Timestamp {
- ByteBuffer getTimestamp();
+ ByteBuffer timestamp();
- ByteBuffer getTime();
+ ByteBuffer time();
- ByteBuffer getIncrement();
+ ByteBuffer increment();
}
Please sign in to comment.
Something went wrong with that request. Please try again.