y.util
Class Cursors

java.lang.Object
  |
  +--y.util.Cursors

public final class Cursors
extends Object

This class contains only static methods, that can be used in conjunction with YCursors and Iterators


Method Summary
static YCursor createCursor(Collection c)
          Creates a YCursor view of a collection
static Iterator createIterator(YCursor cursor)
          Creates an Iterator view of a given YCursor
static Object[] toArray(YCursor cursor, Object[] dest)
          Creates or fills an array with the values provided by the cursor
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

toArray

public static Object[] toArray(YCursor cursor,
                               Object[] dest)
Creates or fills an array with the values provided by the cursor

Parameters:
cursor - the cursor
dest - the array to fill with the values or null if the method should create the array itself
Returns:
dest or a newly created array filled with the values from cursor

createCursor

public static YCursor createCursor(Collection c)
Creates a YCursor view of a collection

Parameters:
c - the collection
Returns:
the cursor view

createIterator

public static Iterator createIterator(YCursor cursor)
Creates an Iterator view of a given YCursor

Parameters:
cursor - the cursor
Returns:
the iterator

© Copyright 2000-2003,
yWorks GmbH.
All rights reserved.

2003