directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r568071 - /directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/DefaultObjectClass.java
Date Tue, 21 Aug 2007 11:29:11 GMT
Author: elecharny
Date: Tue Aug 21 04:29:10 2007
New Revision: 568071

URL: http://svn.apache.org/viewvc?rev=568071&view=rev
Log:
Added three methods : isStructural(), isAbstract() and isAuxilliary()
Used generic

Modified:
    directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/DefaultObjectClass.java

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/DefaultObjectClass.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/DefaultObjectClass.java?rev=568071&r1=568070&r2=568071&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/DefaultObjectClass.java
(original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/DefaultObjectClass.java
Tue Aug 21 04:29:10 2007
@@ -51,13 +51,13 @@
     private ObjectClassTypeEnum type = ObjectClassTypeEnum.ABSTRACT;
 
     /** */
-    private ArrayList mayList;
+    private ArrayList<AttributeType> mayList;
 
     /** */
-    private ArrayList mustList;
+    private ArrayList<AttributeType> mustList;
 
     /** */
-    private ArrayList superClasses;
+    private ArrayList<ObjectClass> superClasses;
 
 
     // ------------------------------------------------------------------------
@@ -67,8 +67,7 @@
     /**
      * Creates an ObjectClassImpl instance with an OID.
      * 
-     * @param oid
-     *            the unique object identifier for this objectClass
+     * @param oid the unique object identifier for this objectClass
      */
     DefaultObjectClass(String oid)
     {
@@ -108,6 +107,24 @@
     }
 
 
+    public boolean isStructural()
+    {
+    	return type == ObjectClassTypeEnum.STRUCTURAL;
+    }
+
+
+    public boolean isAbstract()
+    {
+    	return type == ObjectClassTypeEnum.ABSTRACT;
+    }
+
+    
+    public boolean isAuxiliary()
+    {
+    	return type == ObjectClassTypeEnum.AUXILIARY;
+    }
+
+    
     public AttributeType[] getMayList()
     {
         if ( mayList == null )
@@ -130,11 +147,11 @@
      * @param mayList
      *            more AttributeTypes to add to the optional attribute list
      */
-    void addToMayList( List mayList )
+    void addToMayList( List<AttributeType> mayList )
     {
         if ( this.mayList == null )
         {
-            this.mayList = new ArrayList();
+            this.mayList = new ArrayList<AttributeType>();
         }
 
         this.mayList.addAll( mayList );
@@ -148,11 +165,11 @@
      * @param mustList
      *            more AttributeTypes to add to the mandatory list
      */
-    void addToMustList( List mustList )
+    void addToMustList( List<AttributeType> mustList )
     {
         if ( this.mustList == null )
         {
-            this.mustList = new ArrayList();
+            this.mustList = new ArrayList<AttributeType>();
         }
 
         this.mustList.addAll( mustList );
@@ -165,11 +182,11 @@
      * @param superClasses
      *            the list of super classes to add to this ObjectClass
      */
-    void addSuperClasses( List superClasses )
+    void addSuperClasses( List<ObjectClass> superClasses )
     {
         if ( this.superClasses == null )
         {
-            this.superClasses = new ArrayList();
+            this.superClasses = new ArrayList<ObjectClass>();
         }
 
         this.superClasses.addAll( superClasses );



Mime
View raw message