public void visit(Option obj) { List<String> dep = obj.getDependentGroups(); List<String> notDep = obj.getNotDependentGroups(); if (dep != null && !dep.isEmpty() && notDep != null && !notDep.isEmpty()) { String groupName = null; String notDepGroup = null; for (Iterator<String> i = dep.iterator(); i.hasNext();) { groupName = i.next(); for (Iterator<String> j = notDep.iterator(); j.hasNext();) { notDepGroup = j.next(); if (notDepGroup.equalsIgnoreCase(groupName)) { handleValidationError(QueryPlugin.Util.getString("ValidationVisitor.group_in_both_dep", groupName), obj); //$NON-NLS-1$ return; } } } } }
public void visit(Option obj) { List<String> dep = obj.getDependentGroups(); List<String> notDep = obj.getNotDependentGroups(); if (dep != null && !dep.isEmpty() && notDep != null && !notDep.isEmpty()) { String groupName = null; String notDepGroup = null; for (Iterator<String> i = dep.iterator(); i.hasNext();) { groupName = i.next(); for (Iterator<String> j = notDep.iterator(); j.hasNext();) { notDepGroup = j.next(); if (notDepGroup.equalsIgnoreCase(groupName)) { handleValidationError(QueryPlugin.Util.getString("ValidationVisitor.group_in_both_dep", groupName), obj); //$NON-NLS-1$ return; } } } } }
public void visit(Option obj) { List<String> dep = obj.getDependentGroups(); List<String> notDep = obj.getNotDependentGroups(); if (dep != null && !dep.isEmpty() && notDep != null && !notDep.isEmpty()) { String groupName = null; String notDepGroup = null; for (Iterator<String> i = dep.iterator(); i.hasNext();) { groupName = i.next(); for (Iterator<String> j = notDep.iterator(); j.hasNext();) { notDepGroup = j.next(); if (notDepGroup.equalsIgnoreCase(groupName)) { handleValidationError(QueryPlugin.Util.getString("ValidationVisitor.group_in_both_dep", groupName), obj); //$NON-NLS-1$ return; } } } } }
/** * Return deep copy of this option object * @return Deep copy of the object */ public Object clone() { Option newOption = new Option(); newOption.setNoCache(noCache); if(this.makeDependentGroups != null) { newOption.makeDependentGroups = new ArrayList<String>(this.makeDependentGroups); newOption.makeDependentOptions = new ArrayList<MakeDep>(this.makeDependentOptions); } if(this.makeIndependentGroups != null) { newOption.makeIndependentGroups = new ArrayList<String>(this.makeIndependentGroups); newOption.makeIndependentOptions = new ArrayList<MakeDep>(this.makeIndependentOptions); } if(getNotDependentGroups() != null) { newOption.makeNotDependentGroups = new ArrayList<String>(getNotDependentGroups()); } if(getNoCacheGroups() != null) { newOption.noCacheGroups = new ArrayList<String>(getNoCacheGroups()); } return newOption; } }
/** * Return deep copy of this option object * @return Deep copy of the object */ public Object clone() { Option newOption = new Option(); newOption.setNoCache(noCache); if(this.makeDependentGroups != null) { newOption.makeDependentGroups = new ArrayList<String>(this.makeDependentGroups); newOption.makeDependentOptions = new ArrayList<MakeDep>(this.makeDependentOptions); } if(this.makeIndependentGroups != null) { newOption.makeIndependentGroups = new ArrayList<String>(this.makeIndependentGroups); newOption.makeIndependentOptions = new ArrayList<MakeDep>(this.makeIndependentOptions); } if(getNotDependentGroups() != null) { newOption.makeNotDependentGroups = new ArrayList<String>(getNotDependentGroups()); } if(getNoCacheGroups() != null) { newOption.noCacheGroups = new ArrayList<String>(getNoCacheGroups()); } return newOption; } }
/** * Return deep copy of this option object * @return Deep copy of the object */ public Object clone() { Option newOption = new Option(); newOption.setNoCache(noCache); if(this.makeDependentGroups != null) { newOption.makeDependentGroups = new ArrayList<String>(this.makeDependentGroups); newOption.makeDependentOptions = new ArrayList<MakeDep>(this.makeDependentOptions); } if(this.makeIndependentGroups != null) { newOption.makeIndependentGroups = new ArrayList<String>(this.makeIndependentGroups); newOption.makeIndependentOptions = new ArrayList<MakeDep>(this.makeIndependentOptions); } if(getNotDependentGroups() != null) { newOption.makeNotDependentGroups = new ArrayList<String>(getNotDependentGroups()); } if(getNoCacheGroups() != null) { newOption.noCacheGroups = new ArrayList<String>(getNoCacheGroups()); } return newOption; } }
/** * Get hash code for Option. * @return Hash code */ public int hashCode() { int hc = 0; if(this.makeDependentGroups != null) { hc = HashCodeUtil.hashCode(hc, this.makeDependentGroups); } if(getNotDependentGroups() != null) { hc = HashCodeUtil.hashCode(hc, getNotDependentGroups()); } if(getNoCacheGroups() != null) { hc = HashCodeUtil.hashCode(hc, getNoCacheGroups()); } return hc; }
/** * Get hash code for Option. * @return Hash code */ public int hashCode() { int hc = 0; if(this.makeDependentGroups != null) { hc = HashCodeUtil.hashCode(hc, this.makeDependentGroups); } if(getNotDependentGroups() != null) { hc = HashCodeUtil.hashCode(hc, getNotDependentGroups()); } if(getNoCacheGroups() != null) { hc = HashCodeUtil.hashCode(hc, getNoCacheGroups()); } return hc; }
/** * Get hash code for Option. * @return Hash code */ public int hashCode() { int hc = 0; if(this.makeDependentGroups != null) { hc = HashCodeUtil.hashCode(hc, this.makeDependentGroups); } if(getNotDependentGroups() != null) { hc = HashCodeUtil.hashCode(hc, getNotDependentGroups()); } if(getNoCacheGroups() != null) { hc = HashCodeUtil.hashCode(hc, getNoCacheGroups()); } return hc; }
/** * Compare two Option clauses for equality. * @param obj Other object * @return True if equal */ public boolean equals(Object obj) { if(obj == this) { return true; } if(!(obj instanceof Option)) { return false; } Option other = (Option) obj; return noCache == other.noCache && EquivalenceUtil.areEqual(makeDependentGroups, other.makeDependentGroups) && EquivalenceUtil.areEqual(makeIndependentGroups, other.makeIndependentGroups) && EquivalenceUtil.areEqual(makeDependentOptions, other.makeDependentOptions) && EquivalenceUtil.areEqual(makeIndependentOptions, other.makeIndependentOptions) && EquivalenceUtil.areEqual(getNotDependentGroups(), other.getNotDependentGroups()) && EquivalenceUtil.areEqual(getNoCacheGroups(), other.getNoCacheGroups()); }
/** * Compare two Option clauses for equality. * @param obj Other object * @return True if equal */ public boolean equals(Object obj) { if(obj == this) { return true; } if(!(obj instanceof Option)) { return false; } Option other = (Option) obj; return noCache == other.noCache && EquivalenceUtil.areEqual(makeDependentGroups, other.makeDependentGroups) && EquivalenceUtil.areEqual(makeIndependentGroups, other.makeIndependentGroups) && EquivalenceUtil.areEqual(makeDependentOptions, other.makeDependentOptions) && EquivalenceUtil.areEqual(makeIndependentOptions, other.makeIndependentOptions) && EquivalenceUtil.areEqual(getNotDependentGroups(), other.getNotDependentGroups()) && EquivalenceUtil.areEqual(getNoCacheGroups(), other.getNoCacheGroups()); }
/** * Compare two Option clauses for equality. * @param obj Other object * @return True if equal */ public boolean equals(Object obj) { if(obj == this) { return true; } if(!(obj instanceof Option)) { return false; } Option other = (Option) obj; return noCache == other.noCache && EquivalenceUtil.areEqual(makeDependentGroups, other.makeDependentGroups) && EquivalenceUtil.areEqual(makeIndependentGroups, other.makeIndependentGroups) && EquivalenceUtil.areEqual(makeDependentOptions, other.makeDependentOptions) && EquivalenceUtil.areEqual(makeIndependentOptions, other.makeIndependentOptions) && EquivalenceUtil.areEqual(getNotDependentGroups(), other.getNotDependentGroups()) && EquivalenceUtil.areEqual(getNoCacheGroups(), other.getNoCacheGroups()); }
groups = obj.getNotDependentGroups(); if (groups != null && groups.size() > 0) { append(" "); //$NON-NLS-1$
groups = obj.getNotDependentGroups(); if (groups != null && groups.size() > 0) { append(" "); //$NON-NLS-1$
groups = obj.getNotDependentGroups(); if (groups != null && groups.size() > 0) { append(" "); //$NON-NLS-1$
distributeDependentHints(cmd.getOption().getDependentGroups(), result, NodeConstants.Info.MAKE_DEP, cmd.getOption().getMakeDepOptions()); if (cmd.getOption().getNotDependentGroups() != null) { distributeDependentHints(cmd.getOption().getNotDependentGroups(), result, NodeConstants.Info.MAKE_NOT_DEP, Collections.nCopies(cmd.getOption().getNotDependentGroups().size(), Boolean.TRUE));
distributeDependentHints(cmd.getOption().getDependentGroups(), result, NodeConstants.Info.MAKE_DEP, cmd.getOption().getMakeDepOptions()); if (cmd.getOption().getNotDependentGroups() != null) { distributeDependentHints(cmd.getOption().getNotDependentGroups(), result, NodeConstants.Info.MAKE_NOT_DEP, Collections.nCopies(cmd.getOption().getNotDependentGroups().size(), Boolean.TRUE));
public void testGetNotDependentGroups() { Option o = new Option(); o.addDependentGroup("a"); //$NON-NLS-1$ o.addNotDependentGroup("b"); //$NON-NLS-1$ o.addNotDependentGroup("c"); //$NON-NLS-1$ assertEquals(Arrays.asList(new Object[] {"b", "c"}), o.getNotDependentGroups()); //$NON-NLS-1$ //$NON-NLS-2$ } }
distributeDependentHints(cmd.getOption().getDependentGroups(), result, NodeConstants.Info.MAKE_DEP, cmd.getOption().getMakeDepOptions()); if (cmd.getOption().getNotDependentGroups() != null) { distributeDependentHints(cmd.getOption().getNotDependentGroups(), result, NodeConstants.Info.MAKE_NOT_DEP, Collections.nCopies(cmd.getOption().getNotDependentGroups().size(), Boolean.TRUE));