package com.onaro.sanscreen.client.view.common.data; import com.onaro.sanscreen.server.interfaces.data.TechnologyType; import java.util.Collection; import java.util.EnumSet; /** * This is a simple collection wrapper that provides access to a set of one or more TechnologyType instances. This * facilitates error-free access to an adaptable/selected object's TechnologyType values via the OnaroAdaptableUtil or * SelectedObjectUtil conversion when there may be multiple technologies, such as with Hosts. */ public class TechnologyTypes { private final EnumSet technologyTypeSet; public TechnologyTypes(Collection technologyTypes) { technologyTypeSet = EnumSet.copyOf(technologyTypes); } public boolean contains(TechnologyType technologyType) { return technologyTypeSet.contains(technologyType); } }