i have a collection i created of type Service
   Collection<Service> collection = serviceMap.values();
My data that is returned by the collection is of type param.
    Service first = collection.iterator().next();
    Set<Param> firstInputParam = first.getInputParamSet();
    Set<Param> firstOutputParam = first.getOutputParamSet();
An example of the outputs of firstInputParam and firstOutputParam:
    first.getInputParamSet: [J]
    first.getOutputParamSet: [C]
My goal and my issue is that i need to find a way to compare if the following outputParam is in the set of second.getInputParamSet.
For example i.getInputParamSet contains:
     Input ParamSet: [E, C]
ive tried the following
      if (i.getInputParamSet().equals(first.getOutputParamSet())){
&
      if (i.getInputParamSet().contains(first.getOutputParamSet())){
but neither of these two methods have worked can anyone assist me. Thank you!
 
     
    