Leap Motion Java API Reference  0.8.0
com.leapmotion.leap.ToolList Class Reference

The ToolList class represents a list of Tool objects. More...

Inherits com.leapmotion.leap.Interface, and Iterable< Tool >.

Public Member Functions

ToolList append (ToolList other)
 Appends the members of the specifed ToolList to this ToolList.
 
int count ()
 Returns the number of tools in this list.
 
boolean empty ()
 Deprecated.
 
Tool frontmost ()
 The member of the list that is farthest to the front within the standard Leap Motion frame of reference (i.e has the smallest Z coordinate).
 
Tool get (int index)
 Access a list member by its position in the list.
 
boolean isEmpty ()
 Reports whether the list is empty.
 
Tool leftmost ()
 The member of the list that is farthest to the left within the standard Leap Motion frame of reference (i.e has the smallest X coordinate).
 
Tool rightmost ()
 The member of the list that is farthest to the right within the standard Leap Motion frame of reference (i.e has the largest X coordinate).
 
 ToolList ()
 Constructs an empty list of tools.
 

Detailed Description

The ToolList class represents a list of Tool objects.

Get a ToolList object by calling Frame::tools().

Constructor & Destructor Documentation

com.leapmotion.leap.ToolList.ToolList ( )

Constructs an empty list of tools.

Member Function Documentation

ToolList com.leapmotion.leap.ToolList.append ( ToolList  other)

Appends the members of the specifed ToolList to this ToolList.

Parameters
otherA ToolList object containing Tool objects to append to the end of this ToolList.
int com.leapmotion.leap.ToolList.count ( )

Returns the number of tools in this list.

Returns
The number of tools in this list.
boolean com.leapmotion.leap.ToolList.empty ( )

Deprecated.

Use ToolList::isEmpty() instead.

See Also
ToolList::isEmpty()
Tool com.leapmotion.leap.ToolList.frontmost ( )

The member of the list that is farthest to the front within the standard Leap Motion frame of reference (i.e has the smallest Z coordinate).

Returns
The frontmost tool, or invalid if list is empty.
Tool com.leapmotion.leap.ToolList.get ( int  index)

Access a list member by its position in the list.

Parameters
indexThe zero-based list position index.
Returns
The Tool object at the specified index.
boolean com.leapmotion.leap.ToolList.isEmpty ( )

Reports whether the list is empty.

Returns
True, if the list has no members.
Tool com.leapmotion.leap.ToolList.leftmost ( )

The member of the list that is farthest to the left within the standard Leap Motion frame of reference (i.e has the smallest X coordinate).

Returns
The leftmost tool, or invalid if list is empty.
Tool com.leapmotion.leap.ToolList.rightmost ( )

The member of the list that is farthest to the right within the standard Leap Motion frame of reference (i.e has the largest X coordinate).

Returns
The rightmost tool, or invalid if list is empty.