directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r797945 - in /directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/entry: Value.java client/ClientBinaryValue.java client/ClientStringValue.java
Date Sun, 26 Jul 2009 15:11:19 GMT
Author: elecharny
Date: Sun Jul 26 15:11:19 2009
New Revision: 797945

URL: http://svn.apache.org/viewvc?rev=797945&view=rev
Log:
o Added a length() method
o Removed the get() from the ClientStringValue class, as it's already prsent in the AbstractValue
class

Modified:
    directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/entry/Value.java
    directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/entry/client/ClientBinaryValue.java
    directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/entry/client/ClientStringValue.java

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/entry/Value.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/entry/Value.java?rev=797945&r1=797944&r2=797945&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/entry/Value.java
(original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/entry/Value.java
Sun Jul 26 15:11:19 2009
@@ -180,4 +180,10 @@
      * @return <code>true</code> if the value is Binary, <code>false</code>
otherwise
      */
     boolean isBinary();
+    
+    
+    /**
+     * @return The length of the interned value
+     */
+    int length();
 }

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/entry/client/ClientBinaryValue.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/entry/client/ClientBinaryValue.java?rev=797945&r1=797944&r2=797945&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/entry/client/ClientBinaryValue.java
(original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/entry/client/ClientBinaryValue.java
Sun Jul 26 15:11:19 2009
@@ -348,6 +348,15 @@
     {
         return true;
     }
+    
+    
+    /**
+     * @return The length of the interned value
+     */
+    public int length()
+    {
+        return wrapped != null ? wrapped.length : 0;
+    }
 
 
     /**

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/entry/client/ClientStringValue.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/entry/client/ClientStringValue.java?rev=797945&r1=797944&r2=797945&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/entry/client/ClientStringValue.java
(original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/entry/client/ClientStringValue.java
Sun Jul 26 15:11:19 2009
@@ -83,17 +83,6 @@
     // Value<String> Methods
     // -----------------------------------------------------------------------
     /**
-     * Get the stored value.
-     *
-     * @return The stored value
-     */
-    public String get()
-    {
-        return wrapped;
-    }
-
-
-    /**
      * Get a copy of the stored value.
      *
      * @return A copy of the stored value.
@@ -302,8 +291,17 @@
     {
         return false;
     }
-
-
+    
+    
+    /**
+     * @return The length of the interned value
+     */
+    public int length()
+    {
+        return wrapped != null ? wrapped.length() : 0;
+    }
+    
+    
     /**
      * @see Externalizable#readExternal(ObjectInput)
      */



Mime
View raw message