Class NullSelection<E>

    • Constructor Detail

      • NullSelection

        public NullSelection()
      • NullSelection

        public NullSelection​(E... selected)
    • Method Detail

      • clearSelection

        public boolean clearSelection()
        Description copied from interface: MutableSelection
        Change the selection to the empty set. If this represents a change to the current selection then notify each listener.
        Specified by:
        clearSelection in interface MutableSelection<E>
        Returns:
        true, if the set of selected elements was changed.
      • isActive

        public boolean isActive()
        Description copied from interface: Selection
        Indicates whether at least one element is currently selected.
        Specified by:
        isActive in interface Selection<E>
        Returns:
        true if at least one element is selected, false otherwise.
      • isSelected

        public boolean isSelected​(E element)
        Description copied from interface: Selection
        Indicates whether a given element is selected or not.
        Specified by:
        isSelected in interface Selection<E>
        Parameters:
        element - the element to be tested
        Returns:
        true if the element is selected, false otherwise
      • setSelected

        public boolean setSelected​(java.lang.Iterable<E> elements,
                                   boolean selected)
        Description copied from interface: MutableSelection
        Set the selection state.
        Specified by:
        setSelected in interface MutableSelection<E>
        Parameters:
        elements - the elements to change
        selected - true to have the elements selected, false otherwise
        Returns:
        true, if the set of selected elements was changed.
      • setSelected

        public boolean setSelected​(boolean selected,
                                   E... elements)
        Description copied from interface: MutableSelection
        Set the selection state.
        Specified by:
        setSelected in interface MutableSelection<E>
        Parameters:
        selected - true to have the elements selected, false otherwise
        elements - the elements to change
        Returns:
        true, if the set of selected elements was changed.
      • getSelectedCount

        public int getSelectedCount()
        Description copied from interface: Selection
        Returns the number of elements currently selected.
        Specified by:
        getSelectedCount in interface Selection<E>
        Returns:
        the number of selected elements.
      • getSelectedSet

        public java.util.Set<E> getSelectedSet()
        Description copied from interface: Selection
        Returns the selected elements as a Set.
        Specified by:
        getSelectedSet in interface Selection<E>
        Returns:
        the Set of selected elements.
      • iterator

        public java.util.Iterator<E> iterator()
        Specified by:
        iterator in interface java.lang.Iterable<E>
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object