- Timestamp:
- 08/14/19 14:22:44 (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/expeditee/encryption/items/surrogates/Label.java
r1415 r1430 54 54 55 55 public static List<String> getAccessibleLabelsNames(ItemsList itemsList) { 56 // TODO make copy of itemsList in here and then adjust callers so they do not need to make copy. 57 // Alternatively, filter instead of removeIf 56 58 Text[] userLabels = KeyList.UserLabels.get(); 57 59 Stream<String> accessibleUserWideLabels = Arrays.asList(userLabels).stream().map(label -> label.getText()); 58 60 59 Predicate<Item> is LabelWithoutEncryptionLabel = item -> item.getEncryptionLabel() == null || item.getEncryptionLabel().isEmpty();60 itemsList.removeIf(is LabelWithoutEncryptionLabel);61 Predicate<Item> isItemWithoutEncryptionLabel = item -> item.getEncryptionLabel() == null || item.getEncryptionLabel().isEmpty(); 62 itemsList.removeIf(isItemWithoutEncryptionLabel); 61 63 Stream<String> accessibleFrameLocalLabels = itemsList.underlying().stream().map(item -> item.getEncryptionLabel()).distinct(); 62 64
Note:
See TracChangeset
for help on using the changeset viewer.