下面列出了org.apache.commons.lang.ObjectUtils#notEqual ( ) 实例代码,或者点击链接到github查看源代码,也可以在右侧发表评论。
/**
* Check if this extended message format is equal to another object.
*
* @param obj the object to compare to
* @return true if this object equals the other, otherwise false
* @since 2.6
*/
public boolean equals(Object obj) {
if (obj == this) {
return true;
}
if (obj == null) {
return false;
}
if (!super.equals(obj)) {
return false;
}
if (ObjectUtils.notEqual(getClass(), obj.getClass())) {
return false;
}
ExtendedMessageFormat rhs = (ExtendedMessageFormat)obj;
if (ObjectUtils.notEqual(toPattern, rhs.toPattern)) {
return false;
}
if (ObjectUtils.notEqual(registry, rhs.registry)) {
return false;
}
return true;
}
/**
* Performs the core process of function resolution.
*/
protected Map<String, StellarFunctionInfo> resolveFunctions() {
// maps a function name to its definition
Map<String, StellarFunctionInfo> functions = new HashMap<>();
for(Class<? extends StellarFunction> clazz : resolvables()) {
StellarFunctionInfo fn = resolveFunction(clazz);
if(fn != null) {
// check for duplicate function names
StellarFunctionInfo fnSameName = functions.get(fn.getName());
if (fnSameName != null && ObjectUtils.notEqual(fnSameName, fn)) {
LOG.warn("Namespace conflict: duplicate function names; `{}` implemented by [{}, {}]",
fn.getName(), fnSameName.getFunction(), fn.getFunction());
}
functions.put(fn.getName(), fn);
}
}
return functions;
}
/**
* Searches the given collection for an element that is equal to the given exhibit for purposes of consolidation.
*
* @param coll The collection to search for a like element.
* @param exhibit The search criteria.
*
* @return The element from the collection that matches the exhibit or null if 1) no items match or
* the 2) exhibit is null.
*
*/
private static EmployeeFunding findEmployeeFunding(Collection<EmployeeFunding> coll, EmployeeFunding exhibit){
if (exhibit == null){
return null;
}
for (EmployeeFunding temp : coll){
if (temp == null){
continue;
}
if (ObjectUtils.notEqual(temp.getEmplid(), exhibit.getEmplid())){
continue;
}
if (ObjectUtils.notEqual(temp.getUniversityFiscalYear(), exhibit.getUniversityFiscalYear())){
continue;
}
if (ObjectUtils.notEqual(temp.getChartOfAccountsCode(), exhibit.getChartOfAccountsCode())){
continue;
}
if (ObjectUtils.notEqual(temp.getAccountNumber(), exhibit.getAccountNumber())){
continue;
}
if (ObjectUtils.notEqual(temp.getSubAccountNumber(), exhibit.getSubAccountNumber())){
continue;
}
if (ObjectUtils.notEqual(temp.getFinancialObjectCode(), exhibit.getFinancialObjectCode())){
continue;
}
if (ObjectUtils.notEqual(temp.getFinancialSubObjectCode(), exhibit.getFinancialSubObjectCode())){
continue;
}
if (ObjectUtils.notEqual(temp.getPositionNumber(), exhibit.getPositionNumber())){
continue;
}
return temp;
}
/*no items in the collection match the exhibit.*/
return null;
}