You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@directory.apache.org by ak...@apache.org on 2007/09/25 07:39:20 UTC
svn commit: r579077 - in
/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/subtree:
BaseSubtreeSpecification.java SubtreeSpecification.java
Author: akarasulu
Date: Mon Sep 24 22:39:20 2007
New Revision: 579077
URL: http://svn.apache.org/viewvc?rev=579077&view=rev
Log:
cleaned up some generics
Modified:
directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/subtree/BaseSubtreeSpecification.java
directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/subtree/SubtreeSpecification.java
Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/subtree/BaseSubtreeSpecification.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/subtree/BaseSubtreeSpecification.java?rev=579077&r1=579076&r2=579077&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/subtree/BaseSubtreeSpecification.java (original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/subtree/BaseSubtreeSpecification.java Mon Sep 24 22:39:20 2007
@@ -40,10 +40,10 @@
private final LdapDN base;
/** the set of subordinates entries and their subordinates to exclude */
- private final Set chopBefore;
+ private final Set<LdapDN> chopBefore;
/** the set of subordinates entries whose subordinates are to be excluded */
- private final Set chopAfter;
+ private final Set<LdapDN> chopAfter;
/** the minimum distance below base to start including entries */
private final int minBaseDistance;
@@ -67,18 +67,14 @@
* base and all subordinates underneath (excluding those that are part of
* inner areas) are part of the the subtree.
*/
+ @SuppressWarnings("unchecked")
public BaseSubtreeSpecification()
{
this.base = new LdapDN();
-
this.minBaseDistance = 0;
-
this.maxBaseDistance = UNBOUNDED_MAX;
-
this.chopAfter = Collections.EMPTY_SET;
-
this.chopBefore = Collections.EMPTY_SET;
-
this.refinement = null;
}
@@ -92,18 +88,14 @@
* the filter expression only composed of objectClass attribute
* value assertions
*/
+ @SuppressWarnings("unchecked")
public BaseSubtreeSpecification(ExprNode refinement)
{
this.base = new LdapDN();
-
this.minBaseDistance = 0;
-
this.maxBaseDistance = UNBOUNDED_MAX;
-
this.chopAfter = Collections.EMPTY_SET;
-
this.chopBefore = Collections.EMPTY_SET;
-
this.refinement = refinement;
}
@@ -116,18 +108,14 @@
* @param base
* the base of the subtree relative to the administrative point
*/
+ @SuppressWarnings("unchecked")
public BaseSubtreeSpecification( LdapDN base )
{
this.base = base;
-
this.minBaseDistance = 0;
-
this.maxBaseDistance = UNBOUNDED_MAX;
-
this.chopAfter = Collections.EMPTY_SET;
-
this.chopBefore = Collections.EMPTY_SET;
-
this.refinement = null;
}
@@ -149,7 +137,8 @@
* the set of subordinates entries and their subordinates to
* exclude
*/
- public BaseSubtreeSpecification( LdapDN base, int minBaseDistance, int maxBaseDistance, Set chopAfter, Set chopBefore )
+ public BaseSubtreeSpecification( LdapDN base, int minBaseDistance, int maxBaseDistance,
+ Set<LdapDN> chopAfter, Set<LdapDN> chopBefore )
{
this( base, minBaseDistance, maxBaseDistance, chopAfter, chopBefore, null );
}
@@ -176,11 +165,10 @@
* the filter expression only composed of objectClass attribute
* value assertions
*/
- public BaseSubtreeSpecification( LdapDN base, int minBaseDistance, int maxBaseDistance, Set chopAfter, Set chopBefore,
- ExprNode refinement )
+ public BaseSubtreeSpecification( LdapDN base, int minBaseDistance, int maxBaseDistance,
+ Set<LdapDN> chopAfter, Set<LdapDN> chopBefore, ExprNode refinement )
{
this.base = base;
-
this.minBaseDistance = minBaseDistance;
if ( maxBaseDistance < 0 )
@@ -193,9 +181,7 @@
}
this.chopAfter = chopAfter;
-
this.chopBefore = chopBefore;
-
this.refinement = refinement;
}
@@ -204,19 +190,20 @@
// A C C E S S O R S
// -----------------------------------------------------------------------
+
public LdapDN getBase()
{
return this.base;
}
- public Set getChopBeforeExclusions()
+ public Set<LdapDN> getChopBeforeExclusions()
{
return this.chopBefore;
}
- public Set getChopAfterExclusions()
+ public Set<LdapDN> getChopAfterExclusions()
{
return this.chopAfter;
}
@@ -283,9 +270,9 @@
buffer.append( ' ' );
buffer.append( '{' );
- for ( Iterator it = chopBefore.iterator(); it.hasNext(); )
+ for ( Iterator<LdapDN> it = chopBefore.iterator(); it.hasNext(); )
{
- LdapDN dn = ( LdapDN ) it.next();
+ LdapDN dn = it.next();
buffer.append( ' ' );
buffer.append( "chopBefore" );
buffer.append( ':' );
@@ -307,9 +294,9 @@
buffer.append( ' ' );
}
- for ( Iterator it = chopAfter.iterator(); it.hasNext(); )
+ for ( Iterator<LdapDN> it = chopAfter.iterator(); it.hasNext(); )
{
- LdapDN dn = ( LdapDN ) it.next();
+ LdapDN dn = it.next();
buffer.append( ' ' );
buffer.append( "chopAfter" );
buffer.append( ':' );
Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/subtree/SubtreeSpecification.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/subtree/SubtreeSpecification.java?rev=579077&r1=579076&r2=579077&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/subtree/SubtreeSpecification.java (original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/subtree/SubtreeSpecification.java Mon Sep 24 22:39:20 2007
@@ -63,7 +63,7 @@
* @return a set of relative {@link javax.naming.Name}s to the subtree base
* or the empty set
*/
- Set getChopBeforeExclusions();
+ Set<LdapDN> getChopBeforeExclusions();
/**
@@ -75,7 +75,7 @@
* @return a set of relative {@link javax.naming.Name}s to the subtree base
* or the empty set
*/
- Set getChopAfterExclusions();
+ Set<LdapDN> getChopAfterExclusions();
/**