Module org.jfree.chart3d
Package org.jfree.chart3d.interaction

# Class StandardXYZDataItemSelection<S>

java.lang.Object
org.jfree.chart3d.interaction.StandardXYZDataItemSelection<S>

Type Parameters:
  `S` - S

All Implemented Interfaces:
  `XYZDataItemSelection`

public class StandardXYZDataItemSelection<S> extends Object implements XYZDataItemSelection
An object that tracks selected items from an `XYZDataset`.

Since:
  1.3

## Constructor Summary

Constructors
Constructor
Description
`StandardXYZDataItemSelection()`
Creates a new (empty) selection.

## Method Summary

Modifier and Type
Method
Description
`boolean`
`add(XYZItemKey item)`
Adds an item to the selection, returns `true` if the item was added and `false` if it already existed in the selection.
`boolean`
`addAll(Collection<XYZItemKey> keys)`
Adds all the items from the specified collection, returning `true` if the selection is updated or `false` if all the supplied keys are already present in the selection.
`void`
`clear()`
Clears the selection.
`boolean`
`isSelected(XYZItemKey item)`
Returns `true` if the item is present in the selection, and `false` otherwise.
`boolean`
`remove(XYZItemKey item)`
Removes an item from the selection, returning `true` if the item was removed and `false` if it was not present in the selection.

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Constructor Details

### StandardXYZDataItemSelection

public StandardXYZDataItemSelection()
Creates a new (empty) selection.

## Method Details

### add

public boolean add(XYZItemKey item)
Adds an item to the selection, returns `true` if the item was added and `false` if it already existed in the selection.

Parameters:
  `item` - the item key (`null` not permitted).
Returns:
  A boolean.

### addAll

public boolean addAll(Collection<XYZItemKey> keys)
Adds all the items from the specified collection, returning `true` if the selection is updated or `false` if all the supplied keys are already present in the selection.

Parameters:
  `keys` - the keys (`null` not permitted).
Returns:
  A boolean.

### remove

public boolean remove(XYZItemKey item)
Removes an item from the selection, returning `true` if the item was removed and `false` if it was not present in the selection.

Parameters:
  `item` - the item (`null` not permitted).
Returns:
  A boolean.

### isSelected

public boolean isSelected(XYZItemKey item)
Returns `true` if the item is present in the selection, and `false` otherwise.

Specified by:
  `isSelected` in interface `XYZDataItemSelection<S>`
Parameters:
  `item` - the item `null` not permitted).
Returns:
  A boolean.

### clear

public void clear()
Clears the selection.