1 package org.catacomb.druid.build; 2 3 4 import java.util.ArrayList; 5 6 7 public class ContingencyGroup { 8 9 String action; 10 11 ArrayList<GroupContingent> contingents; 12 13 public ContingencyGroup(String s) { 14 contingents = new ArrayList<GroupContingent>(); 15 } 16 17 public void setAction(String s) { 18 action = s; 19 } 20 21 public boolean hasAction() { 22 return (action != null); 23 } 24 25 public String getAction() { 26 return action; 27 } 28 29 public void deselectOthers(GroupContingent ctg) { 30 31 for (GroupContingent gc : contingents) { 32 if (gc != ctg) { 33 gc.deselect(); 34 } 35 } 36 } 37 38 39 public void add(GroupContingent ctg) { 40 contingents.add(ctg); 41 } 42 43 44 }