ToolListΒΆ

ToolList Class Reference

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

Inherits Interface, and Iterable< Tool >.

Public Member Functions

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

Detailed Description

The ToolList class represents a list of Tool objects.

ToolList allToolsInFrame = frame.tools();
Deprecated:
3.0

Constructor & Destructor Documentation

ToolList ( )

Constructs an empty list of tools.

Deprecated:
3.0

Member Function Documentation

ToolList append ( ToolList  other)

Appends the members of the specified ToolList to this ToolList.

Parameters
otherA ToolList object containing Tool objects to append to the end of this ToolList.
Deprecated:
3.0
int count ( )

Returns the number of tools in this list.

if (frame.tools().count() > 0) {
//Process tools
}
Returns
The number of tools in this list.
Deprecated:
3.0
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 frontmostTool = frame.tools().frontmost();
Returns
The frontmost tool, or invalid if list is empty.
Deprecated:
3.0
Tool get ( int  index)

Access a list member by its position in the list.

ToolList allToolsinFrame = frame.tools();
for (int index = 0; index < allToolsinFrame.count(); index++) {
System.out.println(allToolsinFrame.get(index));
}
Parameters
indexThe zero-based list position index.
Returns
The Tool object at the specified index.
Deprecated:
3.0
boolean isEmpty ( )

Reports whether the list is empty.

if(!frame.tools().isEmpty()){
//Process this frame's tools
}
Returns
True, if the list has no members.
Deprecated:
3.0
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 leftmostTool = frame.tools().leftmost();
Returns
The leftmost tool, or invalid if list is empty.
Deprecated:
3.0
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).

Tool rightmostTool = frame.tools().rightmost();
Returns
The rightmost tool, or invalid if list is empty.
Deprecated:
3.0