本文整理了Java中php.runtime.Memory.equal()
方法的一些代码示例,展示了Memory.equal()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Memory.equal()
方法的具体详情如下:
包路径:php.runtime.Memory
类名称:Memory
方法名:equal
暂无
代码示例来源:origin: jphp-group/jphp
@Override
public Memory calc(Environment env, TraceInfo trace, Memory o1, Memory o2) {
return o1.equal(o2) ? Memory.TRUE : Memory.FALSE;
}
}
代码示例来源:origin: jphp-group/jphp
@Override
public boolean apply(Memory keyValue, Memory value, Memory keyComparable, Memory comparable) {
return keyValue.equal(keyComparable);
}
});
代码示例来源:origin: jphp-group/jphp
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
Memory memory = (Memory) o;
return equal(memory);
}
代码示例来源:origin: jphp-group/jphp
@Override
public boolean equal(double value) {
return this.getValue().equal(value);
}
代码示例来源:origin: jphp-group/jphp
@Override
public boolean equal(String value) {
return this.getValue().equal(value);
}
代码示例来源:origin: jphp-group/jphp
@Override
public boolean equal(Memory memory) {
return getValue().equal(memory);
}
代码示例来源:origin: jphp-group/jphp
@Override
public boolean equal(long value) {
return this.getValue().equal(value);
}
代码示例来源:origin: jphp-group/jphp
@Override
public boolean equal(boolean value) {
return this.getValue().equal(value);
}
代码示例来源:origin: jphp-group/jphp
/********** RIGHT ******************/
// SPACESHIP
public long spaceshipCompareRight(Memory value) { return equal(value) ? 0 : greater(value) ? -1 : 1; }
public long spaceshipCompareRight(long value) { return equal(value) ? 0 : greater(value) ? -1 : 1; }
代码示例来源:origin: jphp-group/jphp
@Override
public boolean equal(long value) {
return toNumeric().equal(value);
}
代码示例来源:origin: jphp-group/jphp
@Override
public boolean equal(double value) {
return toNumeric().equal(value);
}
代码示例来源:origin: jphp-group/jphp
public long spaceshipCompare(long value) { return equal(value) ? 0 : greater(value) ? 1 : -1; }
public long spaceshipCompare(double value) { return equal(value) ? 0 : greater(value) ? 1 : -1; }
代码示例来源:origin: jphp-group/jphp
public long spaceshipCompareRight(long value) { return equal(value) ? 0 : greater(value) ? -1 : 1; }
public long spaceshipCompareRight(double value) { return equal(value) ? 0 : greater(value) ? -1 : 1; }
代码示例来源:origin: jphp-group/jphp
public long spaceshipCompare(Memory value) { return equal(value) ? 0 : greater(value) ? 1 : -1; }
public long spaceshipCompare(long value) { return equal(value) ? 0 : greater(value) ? 1 : -1; }
代码示例来源:origin: jphp-group/jphp
public long spaceshipCompare(double value) { return equal(value) ? 0 : greater(value) ? 1 : -1; }
public long spaceshipCompare(boolean value) { return equal(value) ? 0 : greater(value) ? 1 : -1; }
代码示例来源:origin: jphp-group/jphp
public long spaceshipCompare(boolean value) { return equal(value) ? 0 : greater(value) ? 1 : -1; }
public long spaceshipCompare(String value) { return equal(value) ? 0 : greater(value) ? 1 : -1; }
代码示例来源:origin: jphp-group/jphp
public long spaceshipCompareRight(double value) { return equal(value) ? 0 : greater(value) ? -1 : 1; }
public long spaceshipCompareRight(boolean value) { return equal(value) ? 0 : greater(value) ? -1 : 1; }
代码示例来源:origin: jphp-group/jphp
@Override
public boolean apply(Memory keyValue, Memory value, Memory keyComparable, Memory comparable) {
return keyValue.equal(keyComparable) && value.toString().equals(comparable.toString());
}
});
代码示例来源:origin: jphp-group/jphp
@Override
public boolean equal(Memory memory) {
switch (memory.type){
case NULL: return toString().equals("");
case DOUBLE:
case INT: return toNumeric().equal(memory);
case STRING: return toString().equals(memory.toString());
case OBJECT:
case ARRAY: return false;
case BOOL: return memory.equal(this.toString());
default: return equal(memory.toValue());
}
}
代码示例来源:origin: jphp-group/jphp
@Override
public int compare(Memory o1, Memory o2) {
o1 = o1.toNumeric();
o2 = o2.toNumeric();
return o1.equal(o2) ? 0 : (o1.greater(o2) ? 1 : -1) * (revert ? -1 : 1);
}
};
内容来源于网络,如有侵权,请联系作者删除!