directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From akaras...@apache.org
Subject svn commit: rev 53933 - incubator/directory/ldap/trunk/common/src/java/org/apache/ldap/common/schema
Date Thu, 07 Oct 2004 03:29:39 GMT
Author: akarasulu
Date: Wed Oct  6 20:29:38 2004
New Revision: 53933

Modified:
   incubator/directory/ldap/trunk/common/src/java/org/apache/ldap/common/schema/BaseMatchingRule.java
Log:
Commit changes ...

 o made everything except oid final - nothing but this identity defining
   property needs to be final
 o added extra protected mutators for now non final properties
 o cleaned up formating and style
 


Modified: incubator/directory/ldap/trunk/common/src/java/org/apache/ldap/common/schema/BaseMatchingRule.java
==============================================================================
--- incubator/directory/ldap/trunk/common/src/java/org/apache/ldap/common/schema/BaseMatchingRule.java
(original)
+++ incubator/directory/ldap/trunk/common/src/java/org/apache/ldap/common/schema/BaseMatchingRule.java
Wed Oct  6 20:29:38 2004
@@ -14,10 +14,10 @@
  *   limitations under the License.
  *
  */
-package org.apache.ldap.common.schema ;
+package org.apache.ldap.common.schema;
 
 
-import java.util.Comparator ;
+import java.util.Comparator;
 
 
 /**
@@ -29,20 +29,20 @@
 public class BaseMatchingRule implements MatchingRule
 {
     /** the object identifier */
-    private final String m_oid ;
+    private final String oid;
+
     /** the syntax this matching rule can be applied to */
-    private final Syntax m_syntax ;
+    private Syntax syntax;
     /** comparator used to compare and match values of the associated syntax */
-    private final Comparator m_comparator ;
+    private Comparator comparator;
     /** normalizer used to transform values to a canonical form */
-    private final Normalizer m_normalizer ;
-
+    private Normalizer normalizer;
     /** isObsolete boolean flag */
-    private boolean m_isObsolete = false ;
+    private boolean isObsolete = false;
     /** a short descriptive name */
-    private String m_name = null ;
+    private String name = null;
     /** a description about this MatchingRule */
-    private String m_description = null ;
+    private String description = null;
     
     
     // ------------------------------------------------------------------------
@@ -53,24 +53,13 @@
     /**
      * Creates a MatchingRule using the minimal set of required information.
      * 
-     * @param a_oid the object identifier for this matching rule
-     * @param a_syntax the syntax this matching rule is applicable to
-     * @param a_comparator the comparator used by this matching rule to compare
-     *      and match values of the associated syntax
-     * @param a_normalizer the normalizer used to transform syntax values to a
-     *      canonical form.
+     * @param oid the object identifier for this matching rule
      */
-    public BaseMatchingRule( String a_oid,
-                                Syntax a_syntax, 
-								Comparator a_comparator, 
-                                Normalizer a_normalizer )
-    {
-        m_oid = a_oid ;
-        m_syntax = a_syntax ;
-        m_comparator = a_comparator ;
-        m_normalizer = a_normalizer ;
+    public BaseMatchingRule( String oid )
+    {
+        this.oid = oid;
     }
-    
+
 
     // ------------------------------------------------------------------------
     // P U B L I C   A C C E S S O R S 
@@ -82,7 +71,7 @@
      */
     public String getDescription()
     {
-        return m_description ;
+        return description;
     }
     
 
@@ -91,7 +80,7 @@
      */
     public String getName()
     {
-        return m_name ;
+        return name;
     }
 
     
@@ -100,7 +89,7 @@
      */
     public String getOid()
     {
-        return m_oid ;
+        return oid;
     }
     
 
@@ -109,7 +98,7 @@
      */
     public Syntax getSyntax()
     {
-        return m_syntax ;
+        return syntax;
     }
     
 
@@ -118,7 +107,7 @@
      */
     public boolean isObsolete()
     {
-        return m_isObsolete ;
+        return isObsolete;
     }
     
 
@@ -127,7 +116,7 @@
      */
     public Comparator getComparator()
     {
-        return m_comparator ;
+        return comparator;
     }
 
     
@@ -136,7 +125,7 @@
      */
     public Normalizer getNormalizer()
     {
-        return m_normalizer ;
+        return normalizer;
     }
 
 
@@ -148,32 +137,68 @@
     /**
      * Sets a short description for this MatchingRule.
      * 
-     * @param a_description the description to set
+     * @param description the description to set
      */
-    protected void setDescription(String a_description)
+    protected void setDescription(String description)
     {
-        m_description = a_description;
+        this.description = description;
     }
 
     
     /**
      * Sets this MatchingRule's isObsolete flag.
      * 
-     * @param a_isObsolete whether or not this object is obsolete.
+     * @param isObsolete whether or not this object is obsolete.
      */
-    protected void setObsolete( boolean a_isObsolete )
+    protected void setObsolete( boolean isObsolete )
     {
-        m_isObsolete = a_isObsolete ;
+        this.isObsolete = isObsolete;
     }
 
     
     /**
      * Sets the short descriptive name for this MatchingRule.
      * 
-     * @param a_name The name to set
+     * @param name The name to set
+     */
+    protected void setName( String name )
+    {
+        this.name = name;
+    }
+
+
+    /**
+     * Sets the syntax this matching rule works with.
+     *
+     * @param syntax the syntax this matching rule is applicable to
+     */
+    protected void setSyntax( Syntax syntax )
+    {
+        this.syntax = syntax;
+    }
+
+
+    /**
+     * Sets the Comparator this MatchingRule uses for values of the associated
+     * Syntax.
+     *
+     * @param comparator the comparator used by this matching rule to compare
+     *      and match values of the associated syntax
+     */
+    protected void setComparator( Comparator comparator )
+    {
+        this.comparator = comparator;
+    }
+
+
+    /**
+     * Sets the Normalizer used to transform Syntax values to a canonimcal form.
+     *
+     * @param normalizer the normalizer used to transform syntax values to a
+     *      canonical form.
      */
-    protected void setName( String a_name )
+    protected void setNormalizer( Normalizer normalizer )
     {
-        m_name = a_name ;
+        this.normalizer = normalizer;
     }
 }

Mime
View raw message