directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r1696170 - /directory/studio/trunk/plugins/openldap.acl.editor/src/main/java/org/apache/directory/studio/openldap/config/acl/model/AclAttributeStyleEnum.java
Date Sun, 16 Aug 2015 22:11:00 GMT
Author: elecharny
Date: Sun Aug 16 22:11:00 2015
New Revision: 1696170

URL: http://svn.apache.org/r1696170
Log:
Added a getNames() method that returns the list of Enum's names

Modified:
    directory/studio/trunk/plugins/openldap.acl.editor/src/main/java/org/apache/directory/studio/openldap/config/acl/model/AclAttributeStyleEnum.java

Modified: directory/studio/trunk/plugins/openldap.acl.editor/src/main/java/org/apache/directory/studio/openldap/config/acl/model/AclAttributeStyleEnum.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/openldap.acl.editor/src/main/java/org/apache/directory/studio/openldap/config/acl/model/AclAttributeStyleEnum.java?rev=1696170&r1=1696169&r2=1696170&view=diff
==============================================================================
--- directory/studio/trunk/plugins/openldap.acl.editor/src/main/java/org/apache/directory/studio/openldap/config/acl/model/AclAttributeStyleEnum.java
(original)
+++ directory/studio/trunk/plugins/openldap.acl.editor/src/main/java/org/apache/directory/studio/openldap/config/acl/model/AclAttributeStyleEnum.java
Sun Aug 16 22:11:00 2015
@@ -19,6 +19,7 @@
  */
 package org.apache.directory.studio.openldap.config.acl.model;
 
+
 /**
  * 
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
@@ -55,4 +56,22 @@ public enum AclAttributeStyleEnum
     {
         return name;
     }
+
+    
+    /**
+     * @return An array with all the Enum value's name
+     */
+    public static String[] getNames()
+    {
+        String[] names = new String[values().length];
+        int pos = 0;
+    
+        for ( AclAttributeStyleEnum AclAttributeStyleEnum : values() )
+        {
+            names[pos] = AclAttributeStyleEnum.name;
+            pos++;
+        }
+        
+        return names;
+    }
 }



Mime
View raw message