/** * Factory method to create an ordered set. * <p> * An <code>ArrayList</code> is used to retain order. * * @param set the set to decorate, must not be null * @throws IllegalArgumentException if set is null */ public static ListOrderedSet decorate(Set set) { return new ListOrderedSet(set); }
/** * Factory method to create an ordered set. * <p> * An <code>ArrayList</code> is used to retain order. * * @param set the set to decorate, must not be null * @throws IllegalArgumentException if set is null */ public static ListOrderedSet decorate(Set set) { return new ListOrderedSet(set); }
/** * Factory method to create an ordered set using the supplied list to retain order. * <p> * A <code>HashSet</code> is used for the set behaviour. * <p> * NOTE: If the list contains duplicates, the duplicates are removed, * altering the specified list. * * @param list the list to decorate, must not be null * @throws IllegalArgumentException if list is null */ public static ListOrderedSet decorate(List list) { if (list == null) { throw new IllegalArgumentException("List must not be null"); } Set set = new HashSet(list); list.retainAll(set); return new ListOrderedSet(set, list); }
public Set makeEmptySet() { return new ListOrderedSet(); }
/** * Factory method to create an ordered set using the supplied list to retain order. * <p> * A <code>HashSet</code> is used for the set behaviour. * <p> * NOTE: If the list contains duplicates, the duplicates are removed, * altering the specified list. * * @param list the list to decorate, must not be null * @throws IllegalArgumentException if list is null */ public static ListOrderedSet decorate(List list) { if (list == null) { throw new IllegalArgumentException("List must not be null"); } Set set = new HashSet(list); list.retainAll(set); return new ListOrderedSet(set, list); }
/** * Factory method to create an ordered set specifying the list and set to use. * <p> * The list and set must both be empty. * * @param set the set to decorate, must be empty and not null * @param list the list to decorate, must be empty and not null * @throws IllegalArgumentException if set or list is null * @throws IllegalArgumentException if either the set or list is not empty * @since Commons Collections 3.1 */ public static ListOrderedSet decorate(Set set, List list) { if (set == null) { throw new IllegalArgumentException("Set must not be null"); } if (list == null) { throw new IllegalArgumentException("List must not be null"); } if (set.size() > 0 || list.size() > 0) { throw new IllegalArgumentException("Set and List must be empty"); } return new ListOrderedSet(set, list); }
/** * Factory method to create an ordered set specifying the list and set to use. * <p> * The list and set must both be empty. * * @param set the set to decorate, must be empty and not null * @param list the list to decorate, must be empty and not null * @throws IllegalArgumentException if set or list is null * @throws IllegalArgumentException if either the set or list is not empty * @since Commons Collections 3.1 */ public static ListOrderedSet decorate(Set set, List list) { if (set == null) { throw new IllegalArgumentException("Set must not be null"); } if (list == null) { throw new IllegalArgumentException("List must not be null"); } if (set.size() > 0 || list.size() > 0) { throw new IllegalArgumentException("Set and List must be empty"); } return new ListOrderedSet(set, list); }
private List<Locale> getAllowedLocalesList(JdbcConnection connection) { Statement stmt = null; ListOrderedSet allowedLocales = new ListOrderedSet();
/** * Factory method to create an ordered set. * <p> * An <code>ArrayList</code> is used to retain order. * * @param set the set to decorate, must not be null * @throws IllegalArgumentException if set is null */ public static ListOrderedSet decorate(Set set) { return new ListOrderedSet(set); }
/** * Factory method to create an ordered set. * <p> * An <code>ArrayList</code> is used to retain order. * * @param set the set to decorate, must not be null * @throws IllegalArgumentException if set is null */ public static ListOrderedSet decorate(Set set) { return new ListOrderedSet(set); }
/** * Factory method to create an ordered set. * <p> * An <code>ArrayList</code> is used to retain order. * * @param set the set to decorate, must not be null * @throws IllegalArgumentException if set is null */ public static ListOrderedSet decorate(Set set) { return new ListOrderedSet(set); }
/** * Factory method to create an ordered set. * <p> * An <code>ArrayList</code> is used to retain order. * * @param set the set to decorate, must not be null * @throws IllegalArgumentException if set is null */ public static ListOrderedSet decorate(Set set) { return new ListOrderedSet(set); }
/** * Factory method to create an ordered set. * <p> * An <code>ArrayList</code> is used to retain order. * * @param set the set to decorate, must not be null * @throws IllegalArgumentException if set is null */ public static ListOrderedSet decorate(Set set) { return new ListOrderedSet(set); }
public StyleClasses() { classes = new ListOrderedSet(); }
public TobagoFacesContext(final FacesContext wrapped) { this.wrapped = wrapped; scriptFiles = SetUniqueList.decorate(new ArrayList()); scriptBlocks = new ListOrderedSet(); styleFiles = new ListOrderedSet(); styleBlocks = new ListOrderedSet(); onloadScripts = SetUniqueList.decorate(new ArrayList()); onunloadScripts = new ListOrderedSet(); onexitScripts = new ListOrderedSet(); onsubmitScripts = new ListOrderedSet(); popups = new ListOrderedSet(); }
/** * Factory method to create an ordered set using the supplied list to retain order. * <p> * A <code>HashSet</code> is used for the set behaviour. * <p> * NOTE: If the list contains duplicates, the duplicates are removed, * altering the specified list. * * @param list the list to decorate, must not be null * @throws IllegalArgumentException if list is null */ public static ListOrderedSet decorate(List list) { if (list == null) { throw new IllegalArgumentException("List must not be null"); } Set set = new HashSet(list); list.retainAll(set); return new ListOrderedSet(set, list); }
/** * Get list of parameter names in the same order as in qualifier. * * @param qualifierString to be parsed * @return List of parameter names. */ private Set parseQualifier(String qualifierString) { Set result = new ListOrderedSet(); Pattern pattern = Pattern.compile("\\$[\\w]+"); Matcher matcher = pattern.matcher(qualifierString); while(matcher.find()) { String name = matcher.group(); result.add(NameConverter.underscoredToJava(name.substring(1), false)); } return result; }
/** * Determines the columns that are present in the given result set. * * @param resultSet The result set * @return The columns */ private Set getColumnsInResultSet(ResultSet resultSet) throws SQLException { ListOrderedSet result = new ListOrderedSet(); ResultSetMetaData metaData = resultSet.getMetaData(); for (int idx = 1; idx <= metaData.getColumnCount(); idx++) { result.add(metaData.getColumnName(idx).toUpperCase()); } return result; } }
/** * {@inheritDoc} */ public Object clone() throws CloneNotSupportedException { ForeignKey result = (ForeignKey)super.clone(); result._name = _name; result._foreignTableName = _foreignTableName; result._references = new ListOrderedSet(); for (Iterator it = _references.iterator(); it.hasNext();) { result._references.add(((Reference)it.next()).clone()); } return result; }
public Collection<FieldScreenTab> getFieldScreenTabs(String fieldId) { Set<FieldScreenTab> fieldScreenTabs = new ListOrderedSet(); for (FieldScreen fieldScreen : getFieldScreens()) { for (FieldScreenTab fieldScreenTab : fieldScreen.getTabs()) { if (fieldScreenTab.getFieldScreenLayoutItem(fieldId) != null) { fieldScreenTabs.add(fieldScreenTab); } } } return fieldScreenTabs; }