Cytoscape 3.0.1 API

org.cytoscape.work.util
Class ListMultipleSelection<T>

java.lang.Object
  extended by org.cytoscape.work.util.ListMultipleSelection<T>
Type Parameters:
T - type of items that will be listed.

public final class ListMultipleSelection<T>
extends Object

List with items of type T : one or more items can be selected.


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
protected  List<T> values
          Declares a List of items of type T.
 
Constructor Summary
ListMultipleSelection(List<T> values)
          Creates a new ListMultipleSelection object.
ListMultipleSelection(T... values)
          Creates a new ListMultipleSelection object.
 
Method Summary
 List<T> getPossibleValues()
          To get all the items of the List values.
 List<T> getSelectedValues()
          Get the items that are currently selected.
 void setSelectedValues(List<T> vals)
          Set the T items as selected in the ListMultipleSelection object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

values

protected final List<T> values
Declares a List of items of type T.

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 jave.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.
Method Detail

getSelectedValues

public List<T> getSelectedValues()
Get the items that are currently selected.

Returns:
a list of selected items.

setSelectedValues

public void setSelectedValues(List<T> vals)
Set the T items as selected in the ListMultipleSelection object.

Parameters:
vals - the selected items.

getPossibleValues

public List<T> getPossibleValues()
To get all the items of the List values.

Returns:
an enumeration of all the items.

Cytoscape 3.0.1 API

Copyright 2011 Cytoscape Consortium. All rights reserved.