1 18 19 20 package sync4j.framework.core; 21 22 import java.util.*; 23 24 25 34 public final class SyncCap 35 implements java.io.Serializable { 36 37 private ArrayList syncTypes = new ArrayList(); 39 40 45 public SyncCap(){} 46 47 55 public SyncCap(final SyncType[] syncTypes) { 56 setSyncType(syncTypes); 57 } 58 59 61 68 public ArrayList getSyncType() { 69 return syncTypes; 70 } 71 72 public void setSyncType(SyncType[] syncTypes) { 73 if (syncTypes == null || syncTypes.length == 0) { 74 throw new IllegalArgumentException ( 75 "syncTypes cannot be null or empty"); 76 } 77 this.syncTypes.clear(); 78 this.syncTypes.addAll(Arrays.asList(syncTypes)); 79 } 80 } | Popular Tags |