BrightSide Workbench Full Report + Source Code
org.turro.zkoss.input.SelectionModel< V > Class Template Reference
Inheritance diagram for org.turro.zkoss.input.SelectionModel< V >:
Collaboration diagram for org.turro.zkoss.input.SelectionModel< V >:

Public Member Functions

 SelectionModel (Collection<? extends V > c)
 
void allSelection ()
 
void resetSelection ()
 
Collection<? extends V > getSelected ()
 
Collection<? extends V > getUnselected ()
 

Detailed Description

Author
Lluis TurrĂ³ Cutiller lluis.nosp@m.@tur.nosp@m.ro.or.nosp@m.g

Definition at line 29 of file SelectionModel.java.

Constructor & Destructor Documentation

◆ SelectionModel()

org.turro.zkoss.input.SelectionModel< V >.SelectionModel ( Collection<? extends V >  c)

Definition at line 31 of file SelectionModel.java.

31  {
32  c.forEach((t) -> {
33  add(new SelectionWrapper<>(t));
34  });
35  }

Member Function Documentation

◆ allSelection()

void org.turro.zkoss.input.SelectionModel< V >.allSelection ( )

Definition at line 37 of file SelectionModel.java.

37  {
38  stream().forEach((t) -> {
39  t.setSelected(true);
40  });
41  }

◆ getSelected()

Collection<? extends V> org.turro.zkoss.input.SelectionModel< V >.getSelected ( )

Definition at line 49 of file SelectionModel.java.

49  {
50  return stream().filter(v -> v.isSelected()).map(v -> v.getEntity()).collect(Collectors.toList());
51  }

◆ getUnselected()

Collection<? extends V> org.turro.zkoss.input.SelectionModel< V >.getUnselected ( )

Definition at line 53 of file SelectionModel.java.

53  {
54  return stream().filter(v -> !v.isSelected()).map(v -> v.getEntity()).collect(Collectors.toList());
55  }

◆ resetSelection()

void org.turro.zkoss.input.SelectionModel< V >.resetSelection ( )

Definition at line 43 of file SelectionModel.java.

43  {
44  stream().forEach((t) -> {
45  t.setSelected(false);
46  });
47  }

The documentation for this class was generated from the following file: