SHARE
TWEET

Untitled

a guest May 26th, 2019 56 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import java.util.List;
  2.  
  3. public class MultipleGroups implements NumberGroup {
  4.     private List<NumberGroup> groupList;
  5.     public MultipleGroups(){
  6.  
  7.     };
  8.    
  9.     public void setGroupList(List<NumberGroup> groupList){
  10.         this.groupList = groupList;
  11.     }
  12.  
  13.     public boolean contains(int value){
  14.         for (NumberGroup group: groupList){
  15.             if (group.contains(value)){
  16.                 return true;
  17.             }
  18.         }
  19.         return false;
  20.     }
  21. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top