Forge - UI API 2.0.0.Alpha3

org.jboss.forge.ui.context
Interface UISelection<SELECTIONTYPE>

Type Parameters:
SELECTIONTYPE - The selection type, must be common between all selections (if multiple).
All Superinterfaces:
Iterable<SELECTIONTYPE>

public interface UISelection<SELECTIONTYPE>
extends Iterable<SELECTIONTYPE>

Represents the objects with on which the UIContext is currently focused. This may be the current working directory, highlighted files, text, or other focusable items. This object and the iterator provided by this object are immutable.

Author:
Lincoln Baxter, III, George Gastaldi

Method Summary
 SELECTIONTYPE get()
          Provides the first selected element as a SELECTIONTYPE.
 int size()
          Counts the elements in this selection.
 
Methods inherited from interface java.lang.Iterable
iterator
 

Method Detail

get

SELECTIONTYPE get()
Provides the first selected element as a SELECTIONTYPE. This is a convenience method to avoid iteration.

Returns:
the first element in this selection

size

int size()
Counts the elements in this selection.

Returns:
the number of selected elements

Forge - UI API 2.0.0.Alpha3

Copyright © 2013 JBoss by Red Hat. All Rights Reserved.