List of usage examples for org.apache.commons.lang ArrayUtils contains
public static boolean contains(boolean[] array, boolean valueToFind)
Checks if the value is in the given array.
From source file:com.pureinfo.srm.org.OrganizationHelper.java
public static List getOtherResearchTypes() throws PureException { List l = NamedValueHelper.getNamedValues(SRMNamedValueTypes.ORG_TYPE, true); ArrayList list = new ArrayList(l.size() - 3); String[] sExcludes = new String[] { SRMConstants.ORG_TYPE.ADMIN_PART, SRMConstants.ORG_TYPE.COLLEGE, SRMConstants.ORG_TYPE.INSTITUTE, }; for (Iterator iter = l.iterator(); iter.hasNext();) { INamedValue nv = (INamedValue) iter.next(); if (!ArrayUtils.contains(sExcludes, nv.getValue())) { list.add(nv.getValue());// ww w. j a v a 2s . c o m } } return list; }
From source file:gov.nih.nci.cabig.caaers.tools.hibernate.WonderfulNamingStrategy.java
@Override public String logicalColumnName(String columnName, String propertyName) { if (ArrayUtils.contains(uppercaseColumns, columnName)) return super.logicalColumnName(StringUtils.upperCase(columnName), propertyName); return super.logicalColumnName(columnName, propertyName); }
From source file:at.bitfire.davdroid.mirakel.webdav.DavHttpRequestRetryHandler.java
@Override protected boolean handleAsIdempotent(final HttpRequest request) { final String method = request.getRequestLine().getMethod().toUpperCase(Locale.ROOT); return ArrayUtils.contains(idempotentMethods, method); }
From source file:com.agimatec.validation.constraints.HasStringValidator.java
public boolean isValid(String s, ConstraintValidatorContext constraintValidatorContext) { return s == null || ArrayUtils.contains(values, s); }
From source file:com.egt.core.aplicacion.Bitacora.java
private static void setLogging() { String key = SEV.ENT_APP_VAR_PREFFIX + "LOGGING"; String log = getKeyValue(key).toLowerCase(); String[] noes = new String[] { "disabled", "false", "off", "on" }; logging = !ArrayUtils.contains(noes, log); System.out.println("logging" + "=" + logging); }
From source file:com.github.dbourdette.otto.data.filler.TokenizeOperation.java
@Override public List<String> handle(String column) { String[] tokens = StringUtils.split(column, separator); List<String> result = new ArrayList<String>(); if (StringUtils.isEmpty(column)) { result.add(""); return result; }/*from w w w. ja va 2 s . c o m*/ for (String token : tokens) { if (!ArrayUtils.contains(stopWords, token)) { result.add(token); } } return result; }
From source file:com.gzj.tulip.jade.statement.DefaultInterpreterFactory.java
public synchronized void addInterpreter(Interpreter interpreter) { if (!ArrayUtils.contains(this.interpreters, interpreter)) { Interpreter[] interpreters = Arrays.copyOf(this.interpreters, this.interpreters.length + 1); interpreters[this.interpreters.length] = interpreter; Arrays.sort(interpreters, new InterpreterComparator()); this.interpreters = interpreters; }/* w w w.ja va 2 s .co m*/ }
From source file:com.sinosoft.one.data.jade.statement.DefaultInterpreterFactory.java
public synchronized void addInterpreter(Interpreter interpreter) { if (!ArrayUtils.contains(this.interpreters, interpreter)) { Interpreter[] interpreters = ArraysEx.copyOf(this.interpreters, this.interpreters.length + 1); interpreters[this.interpreters.length] = interpreter; ArraysEx.sort(interpreters, new InterpreterComparator()); this.interpreters = interpreters; }/*ww w . j a v a2 s . c o m*/ }
From source file:net.paoding.rose.jade.statement.DefaultInterpreterFactory.java
public synchronized void addInterpreter(Interpreter interpreter) { if (!ArrayUtils.contains(this.interpreters, interpreter)) { ArrayList<Interpreter> interpreters = new ArrayList<Interpreter>(this.interpreters.length + 1); interpreters.add(interpreter);/*from w w w . j av a 2 s . c o m*/ Collections.sort(interpreters, new InterpreterComparator()); this.interpreters = interpreters.toArray(new Interpreter[0]); } }
From source file:com.activecq.experiments.activedecorator.mapdecorators.base.AbstractMapDecorator.java
protected boolean isSystemProperty(final String key) { if (ArrayUtils.contains(SYSTEM_PROPERTY_WHITE_LIST, key)) { return false; } else if (StringUtils.startsWith(key, "nt:") || StringUtils.startsWith(key, "jcr:") || StringUtils.startsWith(key, "sling:") || StringUtils.startsWith(key, "cq:")) { return true; }/*from ww w . j av a 2s.co m*/ return false; }