directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From akaras...@apache.org
Subject svn commit: r599166 - /directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/ldif/Entry.java
Date Wed, 28 Nov 2007 22:23:45 GMT
Author: akarasulu
Date: Wed Nov 28 14:23:45 2007
New Revision: 599166

URL: http://svn.apache.org/viewvc?rev=599166&view=rev
Log:
return both List and array of modification items for convenience

Modified:
    directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/ldif/Entry.java

Modified: directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/ldif/Entry.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/ldif/Entry.java?rev=599166&r1=599165&r2=599166&view=diff
==============================================================================
--- directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/ldif/Entry.java
(original)
+++ directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/ldif/Entry.java
Wed Nov 28 14:23:45 2007
@@ -55,6 +55,9 @@
  */
 public class Entry implements Cloneable
 {
+    /** Used in toArray() */
+    public static final ModificationItemImpl[] EMPTY_MODS = new ModificationItemImpl[0];
+
     /** the change type */
     private ChangeType changeType;
 
@@ -283,6 +286,18 @@
     {
         return modificationList;
     }
+
+
+    /**
+     * Gets the modification items as an array.
+     *
+     * @return modification items as an array.
+     */
+    public ModificationItemImpl[] getModificationItemsArray()
+    {
+        return modificationList.toArray( EMPTY_MODS );
+    }
+
 
     /**
      * @return The entry Distinguished name



Mime
View raw message