From d479253768d296a40b4f699e1de9b03c7146a97a Mon Sep 17 00:00:00 2001 From: Jesse Morgan Date: Tue, 3 Dec 2013 14:03:28 -0800 Subject: Adding javadocs and Carbonado User Guide --- .../amazon/carbonado/cursor/SingletonCursor.html | 475 +++++++++++++++++++++ 1 file changed, 475 insertions(+) create mode 100644 apidocs/com/amazon/carbonado/cursor/SingletonCursor.html (limited to 'apidocs/com/amazon/carbonado/cursor/SingletonCursor.html') diff --git a/apidocs/com/amazon/carbonado/cursor/SingletonCursor.html b/apidocs/com/amazon/carbonado/cursor/SingletonCursor.html new file mode 100644 index 0000000..859ba03 --- /dev/null +++ b/apidocs/com/amazon/carbonado/cursor/SingletonCursor.html @@ -0,0 +1,475 @@ + + + + + + +SingletonCursor (Carbonado 1.2.3 API) + + + + + + + +
+ + + + + +
+ + + +
+
com.amazon.carbonado.cursor
+

Class SingletonCursor<S>

+
+
+ +
+
    +
  • +
    +
    All Implemented Interfaces:
    +
    Cursor<S>
    +
    +
    +
    +
    public class SingletonCursor<S>
    +extends java.lang.Object
    +implements Cursor<S>
    +
    Special cursor implementation that returns only one element.
    +
    Author:
    +
    Brian S O'Neill
    +
    See Also:
    EmptyCursor
    +
  • +
+
+
+
    +
  • + +
      +
    • + + +

      Constructor Summary

      + + + + + + + + +
      Constructors 
      Constructor and Description
      SingletonCursor(S object) 
      +
    • +
    + +
      +
    • + + +

      Method Summary

      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      Methods 
      Modifier and TypeMethod and Description
      voidclose() +
      Call close to release any resources being held by this cursor.
      +
      intcopyInto(java.util.Collection<? super S> c) +
      Copies all remaining next elements into the given collection.
      +
      intcopyInto(java.util.Collection<? super S> c, + int limit) +
      Copies a limited amount of remaining next elements into the given + collection.
      +
      booleanhasNext() +
      Returns true if this cursor has more elements.
      +
      Snext() +
      Returns the next element from this cursor.
      +
      intskipNext(int amount) +
      Skips forward by the specified amount of elements, returning the actual + amount skipped.
      +
      java.util.List<S>toList() +
      Copies all remaining next elements into a new modifiable list.
      +
      java.util.List<S>toList(int limit) +
      Copies a limited amount of remaining next elements into a new modifiable + list.
      +
      +
        +
      • + + +

        Methods inherited from class java.lang.Object

        +clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • +
      +
    • +
    +
  • +
+
+
+
    +
  • + +
      +
    • + + +

      Constructor Detail

      + + + + + +
        +
      • +

        SingletonCursor

        +
        public SingletonCursor(S object)
        +
        Parameters:
        object - single object to return from cursor, must not be null
        +
        Throws:
        +
        java.lang.IllegalArgumentException - if object is null
        +
      • +
      +
    • +
    + +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        close

        +
        public void close()
        +
        Description copied from interface: Cursor
        +
        Call close to release any resources being held by this cursor. Further + operations on this cursor will behave as if there are no results.
        +
        +
        Specified by:
        +
        close in interface Cursor<S>
        +
        +
      • +
      + + + +
        +
      • +

        hasNext

        +
        public boolean hasNext()
        +
        Description copied from interface: Cursor
        +
        Returns true if this cursor has more elements. In other words, returns + true if next would return an element rather than throwing + an exception.
        +
        +
        Specified by:
        +
        hasNext in interface Cursor<S>
        +
        +
      • +
      + + + +
        +
      • +

        next

        +
        public S next()
        +
        Description copied from interface: Cursor
        +
        Returns the next element from this cursor. This method may be called + repeatedly to iterate through the results.
        +
        +
        Specified by:
        +
        next in interface Cursor<S>
        +
        +
      • +
      + + + +
        +
      • +

        skipNext

        +
        public int skipNext(int amount)
        +
        Description copied from interface: Cursor
        +
        Skips forward by the specified amount of elements, returning the actual + amount skipped. The actual amount is less than the requested amount only + if the end of the results was reached.
        +
        +
        Specified by:
        +
        skipNext in interface Cursor<S>
        +
        Parameters:
        amount - maximum amount of elements to skip
        +
        Returns:
        actual amount skipped
        +
      • +
      + + + +
        +
      • +

        copyInto

        +
        public int copyInto(java.util.Collection<? super S> c)
        +
        Description copied from interface: Cursor
        +
        Copies all remaining next elements into the given collection. This + method is roughly equivalent to the following: +
        + Cursor cursor;
        + ...
        + while (cursor.hasNext()) {
        +     c.add(cursor.next());
        + }
        + 
        + +

        As a side-effect of calling this method, the cursor is closed.

        +
        +
        Specified by:
        +
        copyInto in interface Cursor<S>
        +
        Returns:
        actual amount of results added
        +
      • +
      + + + +
        +
      • +

        copyInto

        +
        public int copyInto(java.util.Collection<? super S> c,
        +           int limit)
        +
        Description copied from interface: Cursor
        +
        Copies a limited amount of remaining next elements into the given + collection. This method is roughly equivalent to the following: +
        + Cursor cursor;
        + ...
        + while (--limit >= 0 && cursor.hasNext()) {
        +     c.add(cursor.next());
        + }
        + 
        +
        +
        Specified by:
        +
        copyInto in interface Cursor<S>
        +
        limit - maximum amount of elements to copy
        +
        Returns:
        actual amount of results added
        +
      • +
      + + + +
        +
      • +

        toList

        +
        public java.util.List<S> toList()
        +
        Description copied from interface: Cursor
        +
        Copies all remaining next elements into a new modifiable list. This + method is roughly equivalent to the following: +
        + Cursor<S> cursor;
        + ...
        + List<S> list = new ...
        + cursor.copyInto(list);
        + 
        + +

        As a side-effect of calling this method, the cursor is closed.

        +
        +
        Specified by:
        +
        toList in interface Cursor<S>
        +
        Returns:
        a new modifiable list
        +
      • +
      + + + +
        +
      • +

        toList

        +
        public java.util.List<S> toList(int limit)
        +
        Description copied from interface: Cursor
        +
        Copies a limited amount of remaining next elements into a new modifiable + list. This method is roughly equivalent to the following: +
        + Cursor<S> cursor;
        + ...
        + List<S> list = new ...
        + cursor.copyInto(list, limit);
        + 
        +
        +
        Specified by:
        +
        toList in interface Cursor<S>
        +
        Parameters:
        limit - maximum amount of elements to copy
        +
        Returns:
        a new modifiable list
        +
      • +
      +
    • +
    +
  • +
+
+
+ + +
+ + + + + +
+ + +

Copyright © 2006-2013 Amazon Technologies, Inc.. All Rights Reserved.

+ + -- cgit v1.2.3