tfw.tsm.ecd.EventChannelDescriptionUtil Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of tfw Show documentation
Show all versions of tfw Show documentation
The FrameWork for building highly scalable and maintainable applications
The newest version!
package tfw.tsm.ecd;
import java.util.HashSet;
public class EventChannelDescriptionUtil {
private EventChannelDescriptionUtil() {}
public static EventChannelDescription[] create(EventChannelDescription[] ecd) {
if (ecd == null) throw new IllegalArgumentException("ecd == null not allowed!");
HashSet set = new HashSet<>();
for (int i = 0; i < ecd.length; i++) {
if (ecd[i] != null) {
set.add(ecd[i]);
}
}
return set.toArray(new EventChannelDescription[set.size()]);
}
}