Class ListSingleSelection<T>

  • Type Parameters:
    T - type of items that will be listed.

    public final class ListSingleSelection<T>
    extends ListSelection<T>
    List with items of type T : only 1 item can be selected.

    Module: work-api

    To use this in your app, include the following dependency in your POM:


    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.
    • Constructor Detail

      • ListSingleSelection

        public ListSingleSelection​(T... values)
        Creates a new ListSingleSelection object.

         example :
         ListSingleSelection lss = new ListSingleSelection("1","2","3","4")

        values - An arbitrary number of values of type T that can be selected.
      • ListSingleSelection

        public ListSingleSelection​(List<T> values)
        Creates a new ListSingleSelection object.

        example :
                List list = ArrayList();
                ListSingleSelection lss = new ListSingleSelection(list);

        values - The list of values of type T that can be selected. This list may be empty, but not null.
    • Method Detail

      • getSelectedValue

        public T getSelectedValue()
        Get the item that is currently selected.
        the selected item.
      • setSelectedValue

        public void setSelectedValue​(T val)
        Set the val item of type T as selected in the ListSingleSelection.
        val - the selected item.