- 使用 Spring Initializr 创建 Spring Boot 应用程序
- 在Spring Boot中配置Cassandra
- 在 Spring Boot 上配置 Tomcat 连接池
- 将Camel消息路由到嵌入WildFly的Artemis上
本文整理了Java中org.mozilla.javascript.xml.XMLObject.addValues()
方法的一些代码示例,展示了XMLObject.addValues()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。XMLObject.addValues()
方法的具体详情如下:
包路径:org.mozilla.javascript.xml.XMLObject
类名称:XMLObject
方法名:addValues
[英]Custom + operator. Should return Scriptable#NOT_FOUND if this object does not have custom addition operator for the given value, or the result of the addition operation.
The default implementation returns Scriptable#NOT_FOUNDto indicate no custom addition operation.
[中]自定义+运算符。如果此对象没有针对给定值的自定义加法运算符或加法运算的结果,则应返回Scriptable#NOT_FOUND。
默认实现返回Scriptable#NOT _found,表示没有自定义添加操作。
代码示例来源:origin: com.github.tntim96/rhino
public final Object addValues(Context cx, boolean thisIsLeft,
Object value)
{
if (value instanceof XMLObject) {
XMLObject v1, v2;
if (thisIsLeft) {
v1 = this;
v2 = (XMLObject)value;
} else {
v1 = (XMLObject)value;
v2 = this;
}
return lib.addXMLObjects(cx, v1, v2);
}
if (value == Undefined.instance) {
// both "xml + undefined" and "undefined + xml" gives String(xml)
return ScriptRuntime.toString(this);
}
return super.addValues(cx, thisIsLeft, value);
}
代码示例来源:origin: com.sun.phobos/phobos-rhino
public final Object addValues(Context cx, boolean thisIsLeft,
Object value) {
if (value instanceof XMLObject) {
XMLObject v1, v2;
if (thisIsLeft) {
v1 = this;
v2 = (XMLObject)value;
} else {
v1 = (XMLObject)value;
v2 = this;
}
return lib.addXMLObjects(cx, v1, v2);
}
if (value == Undefined.instance) {
// both "xml + undefined" and "undefined + xml" gives String(xml)
return ScriptRuntime.toString(this);
}
return super.addValues(cx, thisIsLeft, value);
}
代码示例来源:origin: com.github.tntim96/rhino
@Override
public final Object addValues(Context cx, boolean thisIsLeft,
Object value) {
if (value instanceof XMLObject) {
XMLObject v1, v2;
if (thisIsLeft) {
v1 = this;
v2 = (XMLObject)value;
} else {
v1 = (XMLObject)value;
v2 = this;
}
return lib.addXMLObjects(cx, v1, v2);
}
if (value == Undefined.instance) {
// both "xml + undefined" and "undefined + xml" gives String(xml)
return ScriptRuntime.toString(this);
}
return super.addValues(cx, thisIsLeft, value);
}
代码示例来源:origin: rhino/js
public static Object add(Object val1, Object val2, Context cx)
{
if(val1 instanceof Number && val2 instanceof Number) {
return wrapNumber(((Number)val1).doubleValue() +
((Number)val2).doubleValue());
}
if (val1 instanceof XMLObject) {
Object test = ((XMLObject)val1).addValues(cx, true, val2);
if (test != Scriptable.NOT_FOUND) {
return test;
}
}
if (val2 instanceof XMLObject) {
Object test = ((XMLObject)val2).addValues(cx, false, val1);
if (test != Scriptable.NOT_FOUND) {
return test;
}
}
if (val1 instanceof Scriptable)
val1 = ((Scriptable) val1).getDefaultValue(null);
if (val2 instanceof Scriptable)
val2 = ((Scriptable) val2).getDefaultValue(null);
if (!(val1 instanceof String) && !(val2 instanceof String))
if ((val1 instanceof Number) && (val2 instanceof Number))
return wrapNumber(((Number)val1).doubleValue() +
((Number)val2).doubleValue());
else
return wrapNumber(toNumber(val1) + toNumber(val2));
return toString(val1).concat(toString(val2));
}
代码示例来源:origin: com.sun.phobos/phobos-rhino
public static Object add(Object val1, Object val2, Context cx)
{
if(val1 instanceof Number && val2 instanceof Number) {
return wrapNumber(((Number)val1).doubleValue() +
((Number)val2).doubleValue());
}
if (val1 instanceof XMLObject) {
Object test = ((XMLObject)val1).addValues(cx, true, val2);
if (test != Scriptable.NOT_FOUND) {
return test;
}
}
if (val2 instanceof XMLObject) {
Object test = ((XMLObject)val2).addValues(cx, false, val1);
if (test != Scriptable.NOT_FOUND) {
return test;
}
}
if (val1 instanceof Scriptable)
val1 = ((Scriptable) val1).getDefaultValue(null);
if (val2 instanceof Scriptable)
val2 = ((Scriptable) val2).getDefaultValue(null);
if (!(val1 instanceof String) && !(val2 instanceof String))
if ((val1 instanceof Number) && (val2 instanceof Number))
return wrapNumber(((Number)val1).doubleValue() +
((Number)val2).doubleValue());
else
return wrapNumber(toNumber(val1) + toNumber(val2));
return toString(val1).concat(toString(val2));
}
代码示例来源:origin: geogebra/geogebra
public static Object add(Object val1, Object val2, Context cx)
{
if(val1 instanceof Number && val2 instanceof Number) {
return wrapNumber(((Number)val1).doubleValue() +
((Number)val2).doubleValue());
}
if (val1 instanceof XMLObject) {
Object test = ((XMLObject)val1).addValues(cx, true, val2);
if (test != Scriptable.NOT_FOUND) {
return test;
}
}
if (val2 instanceof XMLObject) {
Object test = ((XMLObject)val2).addValues(cx, false, val1);
if (test != Scriptable.NOT_FOUND) {
return test;
}
}
if (val1 instanceof Scriptable)
val1 = ((Scriptable) val1).getDefaultValue(null);
if (val2 instanceof Scriptable)
val2 = ((Scriptable) val2).getDefaultValue(null);
if (!(val1 instanceof CharSequence) && !(val2 instanceof CharSequence))
if ((val1 instanceof Number) && (val2 instanceof Number))
return wrapNumber(((Number)val1).doubleValue() +
((Number)val2).doubleValue());
else
return wrapNumber(toNumber(val1) + toNumber(val2));
return new ConsString(toCharSequence(val1), toCharSequence(val2));
}
代码示例来源:origin: io.apigee/rhino
public static Object add(Object val1, Object val2, Context cx)
{
if(val1 instanceof Number && val2 instanceof Number) {
return wrapNumber(((Number)val1).doubleValue() +
((Number)val2).doubleValue());
}
if (val1 instanceof XMLObject) {
Object test = ((XMLObject)val1).addValues(cx, true, val2);
if (test != Scriptable.NOT_FOUND) {
return test;
}
}
if (val2 instanceof XMLObject) {
Object test = ((XMLObject)val2).addValues(cx, false, val1);
if (test != Scriptable.NOT_FOUND) {
return test;
}
}
if (val1 instanceof Scriptable)
val1 = ((Scriptable) val1).getDefaultValue(null);
if (val2 instanceof Scriptable)
val2 = ((Scriptable) val2).getDefaultValue(null);
if (!(val1 instanceof CharSequence) && !(val2 instanceof CharSequence))
if ((val1 instanceof Number) && (val2 instanceof Number))
return wrapNumber(((Number)val1).doubleValue() +
((Number)val2).doubleValue());
else
return wrapNumber(toNumber(val1) + toNumber(val2));
return new ConsString(toCharSequence(val1), toCharSequence(val2));
}
代码示例来源:origin: ro.isdc.wro4j/rhino
public static Object add(Object val1, Object val2, Context cx)
{
if(val1 instanceof Number && val2 instanceof Number) {
return wrapNumber(((Number)val1).doubleValue() +
((Number)val2).doubleValue());
}
if (val1 instanceof XMLObject) {
Object test = ((XMLObject)val1).addValues(cx, true, val2);
if (test != Scriptable.NOT_FOUND) {
return test;
}
}
if (val2 instanceof XMLObject) {
Object test = ((XMLObject)val2).addValues(cx, false, val1);
if (test != Scriptable.NOT_FOUND) {
return test;
}
}
if (val1 instanceof Scriptable)
val1 = ((Scriptable) val1).getDefaultValue(null);
if (val2 instanceof Scriptable)
val2 = ((Scriptable) val2).getDefaultValue(null);
if (!(val1 instanceof CharSequence) && !(val2 instanceof CharSequence))
if ((val1 instanceof Number) && (val2 instanceof Number))
return wrapNumber(((Number)val1).doubleValue() +
((Number)val2).doubleValue());
else
return wrapNumber(toNumber(val1) + toNumber(val2));
return new ConsString(toCharSequence(val1), toCharSequence(val2));
}
代码示例来源:origin: com.github.tntim96/rhino
public static Object add(Object val1, Object val2, Context cx)
{
if(val1 instanceof Number && val2 instanceof Number) {
return wrapNumber(((Number)val1).doubleValue() +
((Number)val2).doubleValue());
}
if (val1 instanceof XMLObject) {
Object test = ((XMLObject)val1).addValues(cx, true, val2);
if (test != Scriptable.NOT_FOUND) {
return test;
}
}
if (val2 instanceof XMLObject) {
Object test = ((XMLObject)val2).addValues(cx, false, val1);
if (test != Scriptable.NOT_FOUND) {
return test;
}
}
if (val1 instanceof Scriptable)
val1 = ((Scriptable) val1).getDefaultValue(null);
if (val2 instanceof Scriptable)
val2 = ((Scriptable) val2).getDefaultValue(null);
if (!(val1 instanceof CharSequence) && !(val2 instanceof CharSequence))
if ((val1 instanceof Number) && (val2 instanceof Number))
return wrapNumber(((Number)val1).doubleValue() +
((Number)val2).doubleValue());
else
return wrapNumber(toNumber(val1) + toNumber(val2));
return new ConsString(toCharSequence(val1), toCharSequence(val2));
}
let request = NSMutableURLRequest(URL: url) request.addValue("application/json", forHTTPHeaderField:
我真的必须仔细研究 WEKA API。我想做的就是为我的属性引入新的标称值。 我有像Sentence 1这样的数据 @relation i-do-not-care @attribute sentenc
这是针对 iOS 的: 我正在尝试从之前中断的连接中恢复文件下载。为此,我只需使用 HTTP header 的范围字段来设置下载请求的起点: NSMutableURLRequest *urlReque
我的最终目标是一个简单的 iPhone View ,带有一个开关,当“打开”时,它会向我的 Spark Core(wifi 微芯片)发送一个 post 请求以打开继电器。 我正在努力以适用于发布请求的
本文整理了Java中org.mozilla.javascript.xml.XMLObject.addValues()方法的一些代码示例,展示了XMLObject.addValues()的具体用法。这些
本文整理了Java中pl.edu.icm.model.bwmeta.y.YTagList.addValue()方法的一些代码示例,展示了YTagList.addValue()的具体用法。这些代码示例主
在我的应用程序中,我必须从我的 API 获取 token ,使用它进行 base 64 编码,然后我必须将它附加到我的所有 api 请求。 我的现状 使用 AFNetworking,我设置了我的自定义
我是一名优秀的程序员,十分优秀!