jackrabbit-oak-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ang...@apache.org
Subject svn commit: r1329802 - /jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/core/BinaryValue.java
Date Tue, 24 Apr 2012 15:43:23 GMT
Author: angela
Date: Tue Apr 24 15:43:22 2012
New Revision: 1329802

URL: http://svn.apache.org/viewvc?rev=1329802&view=rev
Log:
OAK-16 : Proper ValueFactory implementation and Value handling (WIP)
OAK-33 : Values in oak-core (WIP)

- add toString to BinaryValue -> CoreValue#getString()

Modified:
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/core/BinaryValue.java

Modified: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/core/BinaryValue.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/core/BinaryValue.java?rev=1329802&r1=1329801&r2=1329802&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/core/BinaryValue.java
(original)
+++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/core/BinaryValue.java
Tue Apr 24 15:43:22 2012
@@ -48,4 +48,31 @@ public class BinaryValue {
     long length() {
         return mk.getLength(binaryID);
     }
+
+    //-------------------------------------------------------------< Object >---
+
+    @Override
+    public int hashCode() {
+        // TODO
+        return binaryID.hashCode();
+    }
+
+    @Override
+    public boolean equals(Object o) {
+        if (o == this) {
+            return true;
+        }
+
+        if (o instanceof BinaryValue) {
+            BinaryValue other = (BinaryValue) o;
+            return binaryID.equals(other.binaryID);
+        }
+
+        return false;
+    }
+
+    @Override
+    public String toString() {
+        return binaryID;
+    }
 }
\ No newline at end of file



Mime
View raw message