本文整理了Java中php.runtime.Memory.smaller()
方法的一些代码示例,展示了Memory.smaller()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Memory.smaller()
方法的具体详情如下:
包路径:php.runtime.Memory
类名称:Memory
方法名:smaller
暂无
代码示例来源:origin: jphp-group/jphp
@Override
public Memory calc(Environment env, TraceInfo trace, Memory o1, Memory o2) {
return o1.smaller(o2) ? Memory.TRUE : Memory.FALSE;
}
}
代码示例来源:origin: jphp-group/jphp
@Override
public boolean greater(Memory memory) {
return memory.smaller(this);
}
代码示例来源:origin: jphp-group/jphp
@Override
public boolean greater(Memory memory) {
return memory.smaller(this);
}
代码示例来源:origin: jphp-group/jphp
public boolean smallerRight(Memory value) { return value.smaller(this); }
public boolean smallerRight(long value) { return this.greaterEq(value); }
代码示例来源:origin: jphp-group/jphp
public boolean greaterEqRight(long value) { return this.smaller(value); }
public boolean greaterEqRight(double value) { return this.smaller(value); }
代码示例来源:origin: jphp-group/jphp
public boolean greaterEqRight(String value) { return this.smaller(value); }
代码示例来源:origin: jphp-group/jphp
public boolean greaterEqRight(double value) { return this.smaller(value); }
public boolean greaterEqRight(boolean value) { return this.smaller(value); }
代码示例来源:origin: jphp-group/jphp
public boolean greaterEqRight(boolean value) { return this.smaller(value); }
public boolean greaterEqRight(String value) { return this.smaller(value); }
代码示例来源:origin: jphp-group/jphp
@Override
public int compareTo(Memory o) {
if (greater(o))
return 1;
else if (smaller(o))
return -1;
else
return 0;
}
代码示例来源:origin: jphp-group/jphp
@Override
public boolean smaller(Memory memory) {
return getValue().smaller(memory);
}
代码示例来源:origin: jphp-group/jphp
@Override
public boolean smaller(String value) {
return this.getValue().smaller(value);
}
代码示例来源:origin: jphp-group/jphp
@Override
public boolean smaller(long value) {
return this.getValue().smaller(value);
}
代码示例来源:origin: jphp-group/jphp
@Override
public boolean smaller(double value) {
return this.getValue().smaller(value);
}
代码示例来源:origin: jphp-group/jphp
@Override
public boolean smaller(boolean value) {
return this.getValue().smaller(value);
}
代码示例来源:origin: jphp-group/jphp
public boolean greater(String value) { return this.smaller(StringMemory.toNumeric(value)); }
代码示例来源:origin: jphp-group/jphp
public boolean smaller(String value) { return this.smaller(StringMemory.toNumeric(value)); }
代码示例来源:origin: jphp-group/jphp
@Immutable
public static Memory min(Memory value, Memory... args){
if (value.isArray() && args == null){
Memory min = null;
for (Memory one : (ArrayMemory)value){
if (min == null || one.smaller(min))
min = one;
}
return min == null ? Memory.NULL : min.toImmutable();
} else {
Memory min = value;
for(Memory one : args){
if (one.smaller(min))
min = one;
}
return min.toImmutable();
}
}
代码示例来源:origin: jphp-group/jphp
@Override
public boolean smaller(Memory memory) {
switch (memory.type){
case STRING: return toString().compareTo(memory.toString()) < 0;
case REFERENCE: return smaller(memory.toValue());
}
return toNumeric().smaller(memory);
}
代码示例来源:origin: jphp-group/jphp
@Signature(@Arg(value = "comparator", type = HintType.CALLABLE, nullable = true, optional = @Optional("null")))
public Memory min(Environment env, Memory... args) {
Invoker comparator = args[0].isNull() ? null : Invoker.create(env, args[0]);
return getSelfIterator(env)
.stream()
.reduce((one, two) -> {
if (comparator == null) {
return two.smaller(one) ? two : one;
} else {
return comparator.callNoThrow(one, two).toLong() > 0 ? two : one;
}
}).orElse(Memory.NULL);
}
代码示例来源:origin: jphp-group/jphp
continue;
if (value1.smaller(value2))
return -1;
else
内容来源于网络,如有侵权,请联系作者删除!