Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 281789 Details for
Bug 560018
Multiple errors running clean-up for lambda and method references on Platform UI repo
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read
this important communication.
self-contained example
MappedSet.java (text/x-java), 992 bytes, created by
Stephan Herrmann
on 2020-02-11 14:32:46 EST
(
hide
)
Description:
self-contained example
Filename:
MIME Type:
Creator:
Stephan Herrmann
Created:
2020-02-11 14:32:46 EST
Size:
992 bytes
patch
obsolete
>package p1; > >import java.util.*; > >@FunctionalInterface >interface ISetChangeListener<E> extends IObservablesListener { > void handleSetChange(SetChangeEvent<? extends E> event); >} >interface IObservablesListener {} >class SetChangeEvent<E> { > public SetDiff<E> diff; >} >abstract class SetDiff<E> { > public abstract Set<E> getAdditions(); >} > >@SuppressWarnings({"rawtypes", "unchecked", "javadoc"}) >public class MappedSet { > private final Map wrappedMap; > private ISetChangeListener domainListener = event -> { > Set additions = new HashSet(); > for (Iterator it = event.diff.getAdditions().iterator(); it.hasNext();) { > Object added = it.next(); > Object mapValue = wrappedMap.get(added); > if (handleAddition(mapValue)) { > additions.add(mapValue); > } > } > }; > > public MappedSet(Map map) { > this.wrappedMap = map; > } > > public ISetChangeListener getDomainListener() { > return domainListener; > } > > private boolean handleAddition(Object o) { > return o.equals(wrappedMap.get(0)); > } > >}
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 560018
:
281787
|
281788
| 281789