public void setChildren(List/*Component*/ children) { if (children == null) { this.children = new ArrayList(); } else { Validate.allElementsOfType(children, Component.class); this.children = children; } }
public void saveChangeLog(File changeLogFile, List<? extends Entry> entries) throws IOException, InterruptedException { Validate.allElementsOfType(entries, UcmActivity.class); @SuppressWarnings("unchecked") List<UcmActivity> ucmEntries = (List<UcmActivity>) entries; FileOutputStream fileOutputStream = new FileOutputStream(changeLogFile); UcmChangeLogSet.saveToChangeLog(fileOutputStream, ucmEntries); fileOutputStream.close(); } }
/** * Create ResourceLoaderChain with the given loaders as chain. * * @param loaders * The loaders chain. * @throws IllegalArgumentException * if the loaders is null. * @throws IllegalArgumentException * if the loaders contains null element. * @throws IllegalArgumentException * if the loaders contains no {@link ResourceLoader} instance. */ public ResourceLoaderChain(List/* ResourceLoader */loaders) { Validate.notNull(loaders); Validate.noNullElements(loaders); Validate.allElementsOfType(loaders, ResourceLoader.class); addResourceLoaders(loaders); }