19 package org.turro.security;
21 import java.util.Collection;
22 import java.util.Collections;
23 import java.util.TreeSet;
24 import java.util.stream.Collectors;
25 import org.turro.marker.MarkerHelper;
31 public class SecSet extends TreeSet<SecItem> {
33 public SecSet(Collection<? extends SecItem> c) {
91 return new TreeSet(stream().map(t -> t.getSecName()).collect(Collectors.toSet()));
95 return new TreeSet(stream().filter(t -> t.isSelected()).collect(Collectors.toSet()));
99 return new TreeSet(stream().filter(t -> !t.isSelected()).collect(Collectors.toSet()));
103 return new TreeSet(stream().filter(t -> t.isSelected()).map(t -> t.getSecName()).collect(Collectors.toSet()));
107 return new TreeSet(stream().filter(t -> !t.isSelected()).map(t -> t.getSecName()).collect(Collectors.toSet()));
111 return stream().mapToLong(t -> t.getUsage()).max().orElse(0);
117 sec.setSibling(siblings.contains(sec));
122 return new SecSet(Collections.EMPTY_SET);
static String setObfuscatedRightNowPars(String parameters)
void setSelected(boolean selected)
void toggle(String secName)
void unselect(String secName)
TreeSet< SecItem > getUnselected()
TreeSet< String > getUnselectedSecNames()
void markSiblingsFromSelection()
String secUrl(SecItem sec)
TreeSet< String > getSecNames()
void select(String secName)
SecSet(Collection<? extends SecItem > c)
TreeSet< String > getSelectedSecNames()
TreeSet< SecItem > getSelected()
static SecSet getSiblings(Set< String > secNames)