Package org.cytoscape.work.util
Class ListMultipleSelection<T>
- java.lang.Object
-
- org.cytoscape.work.util.ListSelection<T>
-
- org.cytoscape.work.util.ListMultipleSelection<T>
-
- Type Parameters:
T
- type of items that will be listed.
public final class ListMultipleSelection<T> extends ListSelection<T>
List with items of typeT
: one or more items can be selected.Module:
work-api
To use this in your app, include the following dependency in your POM:
<dependency> <groupId>org.cytoscape</groupId> <artifactId>work-api</artifactId> </dependency>
Cytoscape Backwards Compatibility (Final Class): This class is final and therefore can't be extended by users. This means that we may add methods for minor version updates. Methods will only be removed for major version updates.
-
-
Field Summary
-
Fields inherited from class org.cytoscape.work.util.ListSelection
values
-
-
Constructor Summary
Constructors Constructor Description ListMultipleSelection(List<T> values)
Creates a new ListMultipleSelection object.ListMultipleSelection(T... values)
Creates a new ListMultipleSelection object.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description List<T>
getSelectedValues()
Get the items that are currently selected.void
setSelectedValues(List<T> vals)
Set theT
items as selected in the ListMultipleSelection object.-
Methods inherited from class org.cytoscape.work.util.ListSelection
addListener, getListeners, getPossibleValues, listChanged, removeListener, selectionChanged, setPossibleValues
-
-
-
-
Constructor Detail
-
ListMultipleSelection
public ListMultipleSelection(T... values)
Creates a new ListMultipleSelection object.example :
ListMultipleSelection
lms = new ListMultipleSelection ("1","2","3","4"); - Parameters:
values
- An arbitrary number of values of type T items that can be selected.
-
ListMultipleSelection
public ListMultipleSelection(List<T> values)
Creates a new ListMultipleSelection object.example :
java.util.List
list = new java.util.ArrayList (); list.add("1"); list.add("2"); list.add("3"); list.add("4"); ListMultipleSelection lss = new ListMultipleSelection (list); - Parameters:
values
- The list of values of type T that can be selected. The list may be empty.
-
-