本文整理匯總了Java中org.apache.commons.lang.ObjectUtils.notEqual方法的典型用法代碼示例。如果您正苦於以下問題:Java ObjectUtils.notEqual方法的具體用法?Java ObjectUtils.notEqual怎麽用?Java ObjectUtils.notEqual使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類org.apache.commons.lang.ObjectUtils
的用法示例。
在下文中一共展示了ObjectUtils.notEqual方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: equals
import org.apache.commons.lang.ObjectUtils; //導入方法依賴的package包/類
/**
* 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;
}
示例2: resolveFunctions
import org.apache.commons.lang.ObjectUtils; //導入方法依賴的package包/類
/**
* 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;
}
示例3: matches
import org.apache.commons.lang.ObjectUtils; //導入方法依賴的package包/類
/**
* Check two objects match, writing a difference if they don't.
*
* @param description The description to log when the match fails
* @param value1 The first value
* @param value2 The second value
*/
private void matches(String description, Object value1, Object value2) {
if (ObjectUtils.notEqual(value1, value2)) {
difference(String.format("%s does not match: [%s] in %s, [%s] in %s", description, value1, schema1Name, value2, schema2Name));
}
}