You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@directory.apache.org by fe...@apache.org on 2010/05/16 23:12:28 UTC
svn commit: r944913 - in
/directory/shared/trunk/cursor/src/main/java/org/apache/directory/shared/ldap/cursor:
AbstractCursor.java EmptyCursor.java ListCursor.java SingletonCursor.java
Author: felixk
Date: Sun May 16 21:12:28 2010
New Revision: 944913
URL: http://svn.apache.org/viewvc?rev=944913&view=rev
Log:
Set default implementation for the methods in the AbstractCursor and override if needed.
Modified:
directory/shared/trunk/cursor/src/main/java/org/apache/directory/shared/ldap/cursor/AbstractCursor.java
directory/shared/trunk/cursor/src/main/java/org/apache/directory/shared/ldap/cursor/EmptyCursor.java
directory/shared/trunk/cursor/src/main/java/org/apache/directory/shared/ldap/cursor/ListCursor.java
directory/shared/trunk/cursor/src/main/java/org/apache/directory/shared/ldap/cursor/SingletonCursor.java
Modified: directory/shared/trunk/cursor/src/main/java/org/apache/directory/shared/ldap/cursor/AbstractCursor.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/cursor/src/main/java/org/apache/directory/shared/ldap/cursor/AbstractCursor.java?rev=944913&r1=944912&r2=944913&view=diff
==============================================================================
--- directory/shared/trunk/cursor/src/main/java/org/apache/directory/shared/ldap/cursor/AbstractCursor.java (original)
+++ directory/shared/trunk/cursor/src/main/java/org/apache/directory/shared/ldap/cursor/AbstractCursor.java Sun May 16 21:12:28 2010
@@ -95,4 +95,44 @@ public abstract class AbstractCursor<E>
{
return new CursorIterator<E>( this );
}
+
+
+ /**
+ * {@inheritDoc}
+ */
+ public boolean isAfterLast() throws Exception
+ {
+ throw new UnsupportedOperationException( I18n.err( I18n.ERR_02014_UNSUPPORTED_OPERATION, getClass().getName()
+ .concat( "." ).concat( "isAfterLast()" ) ) );
+ }
+
+
+ /**
+ * {@inheritDoc}
+ */
+ public boolean isBeforeFirst() throws Exception
+ {
+ throw new UnsupportedOperationException( I18n.err( I18n.ERR_02014_UNSUPPORTED_OPERATION, getClass().getName()
+ .concat( "." ).concat( "isBeforeFirst()" ) ) );
+ }
+
+
+ /**
+ * {@inheritDoc}
+ */
+ public boolean isFirst() throws Exception
+ {
+ throw new UnsupportedOperationException( I18n.err( I18n.ERR_02014_UNSUPPORTED_OPERATION, getClass().getName()
+ .concat( "." ).concat( "isFirst()" ) ) );
+ }
+
+
+ /**
+ * {@inheritDoc}
+ */
+ public boolean isLast() throws Exception
+ {
+ throw new UnsupportedOperationException( I18n.err( I18n.ERR_02014_UNSUPPORTED_OPERATION, getClass().getName()
+ .concat( "." ).concat( "isLast()" ) ) );
+ }
}
Modified: directory/shared/trunk/cursor/src/main/java/org/apache/directory/shared/ldap/cursor/EmptyCursor.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/cursor/src/main/java/org/apache/directory/shared/ldap/cursor/EmptyCursor.java?rev=944913&r1=944912&r2=944913&view=diff
==============================================================================
--- directory/shared/trunk/cursor/src/main/java/org/apache/directory/shared/ldap/cursor/EmptyCursor.java (original)
+++ directory/shared/trunk/cursor/src/main/java/org/apache/directory/shared/ldap/cursor/EmptyCursor.java Sun May 16 21:12:28 2010
@@ -130,40 +130,4 @@ public class EmptyCursor<E> extends Abst
{
return false;
}
-
-
- /**
- * {@inheritDoc}
- */
- public boolean isAfterLast() throws Exception {
- throw new UnsupportedOperationException( I18n.err(I18n.ERR_02014_UNSUPPORTED_OPERATION, getClass().getName()
- .concat( "." ).concat( "isAfterLast()" )));
- }
-
-
- /**
- * {@inheritDoc}
- */
- public boolean isBeforeFirst() throws Exception {
- throw new UnsupportedOperationException( I18n.err(I18n.ERR_02014_UNSUPPORTED_OPERATION, getClass().getName()
- .concat( "." ).concat( "isBeforeFirst()" )));
- }
-
-
- /**
- * {@inheritDoc}
- */
- public boolean isFirst() throws Exception {
- throw new UnsupportedOperationException( I18n.err(I18n.ERR_02014_UNSUPPORTED_OPERATION, getClass().getName()
- .concat( "." ).concat( "isFirst()" )));
- }
-
-
- /**
- * {@inheritDoc}
- */
- public boolean isLast() throws Exception {
- throw new UnsupportedOperationException( I18n.err(I18n.ERR_02014_UNSUPPORTED_OPERATION, getClass().getName()
- .concat( "." ).concat( "isLast()" )));
- }
}
Modified: directory/shared/trunk/cursor/src/main/java/org/apache/directory/shared/ldap/cursor/ListCursor.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/cursor/src/main/java/org/apache/directory/shared/ldap/cursor/ListCursor.java?rev=944913&r1=944912&r2=944913&view=diff
==============================================================================
--- directory/shared/trunk/cursor/src/main/java/org/apache/directory/shared/ldap/cursor/ListCursor.java (original)
+++ directory/shared/trunk/cursor/src/main/java/org/apache/directory/shared/ldap/cursor/ListCursor.java Sun May 16 21:12:28 2010
@@ -354,6 +354,7 @@ public class ListCursor<E> extends Abstr
/**
* {@inheritDoc}
*/
+ @Override
public boolean isFirst() throws Exception
{
checkNotClosed( "isFirst()" );
@@ -364,6 +365,7 @@ public class ListCursor<E> extends Abstr
/**
* {@inheritDoc}
*/
+ @Override
public boolean isLast() throws Exception
{
checkNotClosed( "isLast()" );
@@ -374,6 +376,7 @@ public class ListCursor<E> extends Abstr
/**
* {@inheritDoc}
*/
+ @Override
public boolean isAfterLast() throws Exception
{
checkNotClosed( "isAfterLast()" );
@@ -384,6 +387,7 @@ public class ListCursor<E> extends Abstr
/**
* {@inheritDoc}
*/
+ @Override
public boolean isBeforeFirst() throws Exception
{
checkNotClosed( "isBeforeFirst()" );
Modified: directory/shared/trunk/cursor/src/main/java/org/apache/directory/shared/ldap/cursor/SingletonCursor.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/cursor/src/main/java/org/apache/directory/shared/ldap/cursor/SingletonCursor.java?rev=944913&r1=944912&r2=944913&view=diff
==============================================================================
--- directory/shared/trunk/cursor/src/main/java/org/apache/directory/shared/ldap/cursor/SingletonCursor.java (original)
+++ directory/shared/trunk/cursor/src/main/java/org/apache/directory/shared/ldap/cursor/SingletonCursor.java Sun May 16 21:12:28 2010
@@ -181,6 +181,7 @@ public class SingletonCursor<E> extends
/**
* {@inheritDoc}
*/
+ @Override
public boolean isFirst() throws Exception
{
checkNotClosed( "()" );
@@ -191,6 +192,7 @@ public class SingletonCursor<E> extends
/**
* {@inheritDoc}
*/
+ @Override
public boolean isLast() throws Exception
{
checkNotClosed( "()" );
@@ -201,6 +203,7 @@ public class SingletonCursor<E> extends
/**
* {@inheritDoc}
*/
+ @Override
public boolean isAfterLast() throws Exception
{
checkNotClosed( "()" );
@@ -211,6 +214,7 @@ public class SingletonCursor<E> extends
/**
* {@inheritDoc}
*/
+ @Override
public boolean isBeforeFirst() throws Exception
{
checkNotClosed( "()" );