本文整理了Java中php.runtime.Memory.isNumber()
方法的一些代码示例,展示了Memory.isNumber()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Memory.isNumber()
方法的具体详情如下:
包路径:php.runtime.Memory
类名称:Memory
方法名:isNumber
暂无
代码示例来源:origin: jphp-group/jphp
public boolean isLongKey() {
return currentKey instanceof Long || (currentKey instanceof Memory && ((Memory) currentKey).isNumber());
}
代码示例来源:origin: jphp-group/jphp
@Override
public boolean isNumber() {
return getValue().isNumber();
}
代码示例来源:origin: jphp-group/jphp
public DieException(Memory value){
super(value.toString());
if (value.isNumber())
exitCode = value.toInteger();
}
代码示例来源:origin: jphp-group/jphp
public void die(Memory value) {
if (value != null) {
if (!value.isNumber())
echo(value.toString());
throw new DieException(value);
} else
throw new DieException(Memory.NULL);
}
代码示例来源:origin: jphp-group/jphp
private static int convertFlags(Memory _flags) {
int result = 0;
if (_flags.isNumber()) {
return _flags.toInteger();
代码示例来源:origin: jphp-group/jphp
if (iterator.getValue().isNumber())
continue;
need.add(iterator.getValue().toString());
代码示例来源:origin: jphp-group/jphp
@Override
public Memory apply(Environment env, Memory value, boolean nullable, boolean strict) {
if (nullable && value.isNull()) {
return value;
}
if (strict) {
switch (type) {
case DOUBLE:
if (value.isNumber()) {
return DoubleMemory.valueOf(value.toDouble());
}
default:
return null;
}
}
switch (type) {
case INT:
return LongMemory.valueOf(value.toLong());
case STRING:
return StringMemory.valueOf(value.toString());
case BOOLEAN:
return TrueMemory.valueOf(value.toBoolean());
case DOUBLE:
return DoubleMemory.valueOf(value.toDouble());
}
return null;
}
代码示例来源:origin: jphp-group/jphp
if (args[1].isNumber()) {
int index = args[1].toInteger();
if (index >= 0 && index < parameters.length) {
代码示例来源:origin: jphp-group/jphp
if (value.isNumber()) {
connector.setName("0.0.0.0:" + value.toInteger());
connector.setPort(value.toInteger());
代码示例来源:origin: jphp-group/jphp
case NUMBER: return value.isNumber();
case DOUBLE: return value.getRealType() == Memory.Type.DOUBLE;
case INT: return value.getRealType() == Memory.Type.INT;
代码示例来源:origin: jphp-group/jphp
@Signature
public Memory merge(String[] refs, ArrayMemory settings) throws IOException, GitAPIException {
MergeCommand command = getWrappedObject().merge();
for (String ref : refs) {
Repository repository = getWrappedObject().getRepository();
ObjectId objectId = repository.resolve(ref);
command.include(objectId);
}
if (settings != null) {
command.setCommit(settings.valueOfIndex("commit").toBoolean());
command.setMessage(settings.valueOfIndex("message").toString());
command.setSquash(settings.valueOfIndex("squash").toBoolean());
Memory fastForward = settings.valueOfIndex("fastForward");
if (fastForward.isNumber()) {
command.setFastForward(MergeCommand.FastForwardMode.valueOf(fastForward.toString()));
}
Memory strategy = settings.valueOfIndex("strategy");
if (strategy.isNotNull()) {
command.setStrategy(MergeStrategy.get(strategy.toString()));
}
}
MergeResult call = command.call();
return GitUtils.valueOf(call);
}
内容来源于网络,如有侵权,请联系作者删除!