You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@directory.apache.org by el...@apache.org on 2009/07/26 17:11:19 UTC
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
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)
*/