本文整理了Java中php.runtime.Memory.identical()
方法的一些代码示例,展示了Memory.identical()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Memory.identical()
方法的具体详情如下:
包路径:php.runtime.Memory
类名称:Memory
方法名:identical
暂无
代码示例来源:origin: jphp-group/jphp
@Override
public Memory calc(Environment env, TraceInfo trace, Memory o1, Memory o2) {
return o1.identical(o2) ? Memory.TRUE : Memory.FALSE;
}
}
代码示例来源:origin: jphp-group/jphp
public boolean notIdentical(long memory) { return !identical(memory); }
public boolean notIdentical(double memory) { return !identical(memory); }
代码示例来源:origin: jphp-group/jphp
public boolean notIdentical(boolean memory) { return !identical(memory); }
public boolean notIdentical(String memory) { return !identical(memory); }
代码示例来源:origin: jphp-group/jphp
public boolean notIdentical(Memory memory) { return !identical(memory); }
public boolean notIdentical(long memory) { return !identical(memory); }
代码示例来源:origin: jphp-group/jphp
public boolean notIdentical(double memory) { return !identical(memory); }
public boolean notIdentical(boolean memory) { return !identical(memory); }
代码示例来源:origin: jphp-group/jphp
public boolean notIdentical(String memory) { return !identical(memory); }
代码示例来源:origin: jphp-group/jphp
@Override
public boolean identical(double value) {
return this.getValue().identical(value);
}
代码示例来源:origin: jphp-group/jphp
@Override
public boolean identical(long value) {
return this.getValue().identical(value);
}
代码示例来源:origin: jphp-group/jphp
@Override
public boolean identical(boolean value) {
return this.getValue().identical(value);
}
代码示例来源:origin: jphp-group/jphp
@Override
public boolean identical(String value) {
return this.getValue().identical(value);
}
代码示例来源:origin: jphp-group/jphp
@Override
public boolean identical(Memory memory) {
return getValue().identical(memory);
}
代码示例来源:origin: jphp-group/jphp
@Override
public Memory setValue(Memory value) {
Memory oldValue = getValue();
Memory memory = super.setValue(value);
if (!value.identical(oldValue)) {
for (Observer observer : observers) {
observer.update(this, oldValue, value);
}
}
return memory;
}
代码示例来源:origin: jphp-group/jphp
public static Memory array_search(Environment env, TraceInfo trace, Memory needle, Memory input, boolean strict) {
if (expecting(env, trace, 1, input, ARRAY)) {
ForeachIterator iterator = input.getNewIterator(env, false, false);
while (iterator.next()) {
Memory value = iterator.getValue();
if (strict && needle.identical(value)) {
return iterator.getMemoryKey();
} else if (needle.equal(value)) {
return iterator.getMemoryKey();
}
}
return Memory.FALSE;
} else {
return Memory.FALSE;
}
}
代码示例来源:origin: jphp-group/jphp
@Runtime.Immutable(ignoreRefs = true)
public static boolean in_array(Environment env, TraceInfo trace, Memory needle, @Reference Memory array,
boolean strict) {
if (expecting(env, trace, 2, array, ARRAY)) {
ForeachIterator iterator = array.getNewIterator(env, false, false);
while (iterator.next()) {
if (strict) {
if (needle.identical(iterator.getValue()))
return true;
} else {
if (needle.equal(iterator.getValue()))
return true;
}
}
return false;
} else
return false;
}
代码示例来源:origin: jphp-group/jphp
@Signature({
@Arg(value = "value"),
@Arg(value = "strict", optional = @Optional("false"))
})
public Memory findValue(Environment env, Memory... args) {
ForeachIterator iterator = getSelfIterator(env);
boolean strict = args[1].toBoolean();
while (iterator.next()) {
if (strict && iterator.getValue().identical(args[0])) {
return iterator.getMemoryKey();
} else if (iterator.getValue().equal(args[0])) {
return iterator.getMemoryKey();
}
}
return Memory.NULL;
}
代码示例来源:origin: jphp-group/jphp
@Signature({
@Arg(value = "collection", type = HintType.TRAVERSABLE),
@Arg(value = "value"),
@Arg(value = "strict", optional = @Optional("false"))
})
public static Memory has(Environment env, Memory... args) {
ForeachIterator iterator = args[0].getNewIterator(env);
if (iterator == null) {
return Memory.NULL;
}
Memory needle = args[1];
boolean strict = args[2].toBoolean();
while (iterator.next()) {
if (strict) {
if (needle.identical(iterator.getValue()))
return Memory.TRUE;
} else {
if (needle.equal(iterator.getValue()))
return Memory.TRUE;
}
}
return Memory.FALSE;
}
代码示例来源:origin: jphp-group/jphp
if ((strict && value1.identical(value2)) || (!strict && value1.equal(value2)))
continue;
代码示例来源:origin: jphp-group/jphp
public static Memory array_keys(Environment env, TraceInfo trace, Memory input, Memory search, boolean strict) {
if (!expecting(env, trace, 1, input, ARRAY))
return Memory.NULL;
ArrayMemory result = new ArrayMemory();
ForeachIterator iterator = input.getNewIterator(env, false, false);
while (iterator.next()) {
if (search == null) {
result.add(iterator.getMemoryKey());
} else {
if (strict && iterator.getValue().identical(search)) {
result.add(iterator.getMemoryKey());
} else if (iterator.getValue().equal(search)) {
result.add(iterator.getMemoryKey());
}
}
}
return result.toConstant();
}
代码示例来源:origin: jphp-group/jphp
else if (origin.getDefaultValue() == null) {
} else if (!origin.getDefaultValue().identical(el.getDefaultValue()))
isFatal = true;
内容来源于网络,如有侵权,请联系作者删除!