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

The HandList class represents a list of Hand objects. More...

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

Public Member Functions

HandList append (HandList other)
 Appends the members of the specifed HandList to this HandList.
 
int count ()
 Returns the number of hands in this list.
 
boolean empty ()
 Deprecated.
 
Hand 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).
 
Hand get (int index)
 Access a list member by its position in the list.
 
 HandList ()
 Constructs an empty list of hands.
 
boolean isEmpty ()
 Reports whether the list is empty.
 
Hand 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).
 
Hand 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).
 

Detailed Description

The HandList class represents a list of Hand objects.

Get a HandList object by calling Frame::hands().

Constructor & Destructor Documentation

com.leapmotion.leap.HandList.HandList ( )

Constructs an empty list of hands.

Member Function Documentation

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

Appends the members of the specifed HandList to this HandList.

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

Returns the number of hands in this list.

Returns
The number of hands in this list.
boolean com.leapmotion.leap.HandList.empty ( )

Deprecated.

Use HandList::isEmpty() instead.

See Also
HandList::isEmpty()
Hand com.leapmotion.leap.HandList.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 hand, or invalid if list is empty.
Hand com.leapmotion.leap.HandList.get ( int  index)

Access a list member by its position in the list.

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

Reports whether the list is empty.

Returns
True, if the list has no members.
Hand com.leapmotion.leap.HandList.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 hand, or invalid if list is empty.
Hand com.leapmotion.leap.HandList.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 hand, or invalid if list is empty.