All Downloads are FREE. Search and download functionalities are using the official Maven repository.

tfw.tsm.ecd.EventChannelDescriptionUtil Maven / Gradle / Ivy

Go to download

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()]);
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy