本文整理了Java中org.jruby.RubyHash.isEmpty
方法的一些代码示例,展示了RubyHash.isEmpty
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。RubyHash.isEmpty
方法的具体详情如下:
包路径:org.jruby.RubyHash
类名称:RubyHash
方法名:isEmpty
暂无
代码示例来源:origin: asciidoctor/asciidoctorj
@Override
public boolean isEmpty() {
return rubyHash.isEmpty();
}
代码示例来源:origin: org.asciidoctor/asciidoctorj
@Override
public boolean isEmpty() {
return rubyHash.isEmpty();
}
代码示例来源:origin: org.jruby/jruby-complete
public boolean isEmpty() { return hash.isEmpty(); }
代码示例来源:origin: org.jruby/jruby-core
public boolean isEmpty() { return hash.isEmpty(); }
代码示例来源:origin: org.jruby/jruby-core
public boolean isEmpty(){
return ( allEnums.isEmpty() && symbolMap.isEmpty() && taggedEnums.isEmpty());
}
代码示例来源:origin: org.jruby/jruby-complete
public boolean isEmpty(){
return ( allEnums.isEmpty() && symbolMap.isEmpty() && taggedEnums.isEmpty());
}
代码示例来源:origin: org.jruby/jruby-complete
@Deprecated
static boolean isEnumConversionRequired(Type type, RubyHash enums) {
if (type instanceof Type.Builtin && enums != null && !enums.isEmpty()) {
switch (type.getNativeType()) {
case CHAR:
case UCHAR:
case SHORT:
case USHORT:
case INT:
case UINT:
case LONG:
case ULONG:
case LONG_LONG:
case ULONG_LONG:
return true;
default:
return false;
}
}
return false;
}
代码示例来源:origin: org.kill-bill.billing/killbill-osgi-bundles-jruby
static boolean isEnumConversionRequired(Type type, RubyHash enums) {
if (type instanceof Type.Builtin && enums != null && !enums.isEmpty()) {
switch (type.getNativeType()) {
case CHAR:
case UCHAR:
case SHORT:
case USHORT:
case INT:
case UINT:
case LONG:
case ULONG:
case LONG_LONG:
case ULONG_LONG:
return true;
default:
return false;
}
}
return false;
}
代码示例来源:origin: org.jruby/jruby-core
@Deprecated
static boolean isEnumConversionRequired(Type type, RubyHash enums) {
if (type instanceof Type.Builtin && enums != null && !enums.isEmpty()) {
switch (type.getNativeType()) {
case CHAR:
case UCHAR:
case SHORT:
case USHORT:
case INT:
case UINT:
case LONG:
case ULONG:
case LONG_LONG:
case ULONG_LONG:
return true;
default:
return false;
}
}
return false;
}
代码示例来源:origin: com.ning.billing/killbill-osgi-bundles-jruby
static boolean isEnumConversionRequired(Type type, RubyHash enums) {
if (type instanceof Type.Builtin && enums != null && !enums.isEmpty()) {
switch (type.getNativeType()) {
case CHAR:
case UCHAR:
case SHORT:
case USHORT:
case INT:
case UINT:
case LONG:
case ULONG:
case LONG_LONG:
case ULONG_LONG:
return true;
default:
return false;
}
}
return false;
}
代码示例来源:origin: org.jruby/jruby-complete
private static IRubyObject[] dropLastArgIfOptions(final Ruby runtime, final IRubyObject[] args) {
IRubyObject lastArg = args[args.length - 1];
if (lastArg instanceof RubyHash) {
if (!((RubyHash) lastArg).isEmpty()) {
runtime.getWarnings().warn(ID.UNSUPPORTED_SUBPROCESS_OPTION, "system does not support options in JRuby yet: " + lastArg);
}
return Arrays.copyOf(args, args.length - 1);
}
return args;
}
代码示例来源:origin: org.jruby/jruby-core
private static IRubyObject[] dropLastArgIfOptions(final Ruby runtime, final IRubyObject[] args) {
IRubyObject lastArg = args[args.length - 1];
if (lastArg instanceof RubyHash) {
if (!((RubyHash) lastArg).isEmpty()) {
runtime.getWarnings().warn(ID.UNSUPPORTED_SUBPROCESS_OPTION, "system does not support options in JRuby yet: " + lastArg);
}
return Arrays.copyOf(args, args.length - 1);
}
return args;
}
代码示例来源:origin: org.jruby/jruby-complete
static IRubyObject handleOptionsCommon(ThreadContext context, Ruby runtime, ExecArg eargp, RubyHash opthash, boolean raise) {
if (opthash.isEmpty())
return null;
RubyHash nonopts = null;
for (Map.Entry<IRubyObject, IRubyObject> entry : (Set<Map.Entry<IRubyObject, IRubyObject>>)opthash.directEntrySet()) {
IRubyObject key = entry.getKey();
IRubyObject val = entry.getValue();
if (execargAddopt(context, runtime, eargp, key, val) != ST_CONTINUE) {
if (raise) {
if (key instanceof RubySymbol) {
switch (key.toString()) {
case "gid" :
throw runtime.newNotImplementedError("popen does not support :gid option in JRuby");
case "uid" :
throw runtime.newNotImplementedError("popen does not support :uid option in JRuby");
default :
throw runtime.newArgumentError("wrong exec option symbol: " + key);
}
}
else {
throw runtime.newArgumentError("wrong exec option: " + key);
}
}
if (nonopts == null) nonopts = RubyHash.newHash(runtime);
nonopts.op_aset(context, key, val);
}
}
return nonopts != null ? nonopts : context.nil;
}
代码示例来源:origin: org.jruby/jruby-complete
@JRubyMethod(name = "any?", optional = 1)
public IRubyObject any_p(ThreadContext context, IRubyObject[] args, Block block) {
IRubyObject pattern = args.length > 0 ? args[0] : null;
boolean patternGiven = pattern != null;
if (isEmpty()) return context.fals;
if (!block.isGiven() && !patternGiven) return context.tru;
if (patternGiven) return any_p_p(context, pattern);
if (block.getSignature().arityValue() > 1) {
return any_p_i_fast(context, block);
}
return any_p_i(context, block);
}
代码示例来源:origin: org.jruby/jruby-core
@JRubyMethod(name = "any?", optional = 1)
public IRubyObject any_p(ThreadContext context, IRubyObject[] args, Block block) {
IRubyObject pattern = args.length > 0 ? args[0] : null;
boolean patternGiven = pattern != null;
if (isEmpty()) return context.fals;
if (!block.isGiven() && !patternGiven) return context.tru;
if (patternGiven) return any_p_p(context, pattern);
if (block.getSignature().arityValue() > 1) {
return any_p_i_fast(context, block);
}
return any_p_i(context, block);
}
代码示例来源:origin: org.jruby/jruby-complete
private void recursivePop(IRubyObject list, IRubyObject obj, IRubyObject paired_obj) {
if(paired_obj != null) {
IRubyObject pair_list = ((RubyHash)list).fastARef(obj);
if(pair_list == null) {
throw runtime.newTypeError("invalid inspect_tbl pair_list for " + runtime.getCurrentContext().getFrameName());
}
if(pair_list instanceof RubyHash) {
((RubyHash)pair_list).delete(runtime.getCurrentContext(), paired_obj, Block.NULL_BLOCK);
if(!((RubyHash)pair_list).isEmpty()) {
return;
}
}
}
((RubyHash)list).delete(runtime.getCurrentContext(), obj, Block.NULL_BLOCK);
}
代码示例来源:origin: com.ning.billing/killbill-osgi-bundles-jruby
private void recursivePop(IRubyObject list, IRubyObject obj, IRubyObject paired_obj) {
if(paired_obj != null) {
IRubyObject pair_list = ((RubyHash)list).fastARef(obj);
if(pair_list == null) {
throw newTypeError("invalid inspect_tbl pair_list for " + getCurrentContext().getFrameName());
}
if(pair_list instanceof RubyHash) {
((RubyHash)pair_list).delete(getCurrentContext(), paired_obj, Block.NULL_BLOCK);
if(!((RubyHash)pair_list).isEmpty()) {
return;
}
}
}
((RubyHash)list).delete(getCurrentContext(), obj, Block.NULL_BLOCK);
}
代码示例来源:origin: org.jruby/jruby-core
private void recursivePop(IRubyObject list, IRubyObject obj, IRubyObject paired_obj) {
if(paired_obj != null) {
IRubyObject pair_list = ((RubyHash)list).fastARef(obj);
if(pair_list == null) {
throw runtime.newTypeError("invalid inspect_tbl pair_list for " + runtime.getCurrentContext().getFrameName());
}
if(pair_list instanceof RubyHash) {
((RubyHash)pair_list).delete(runtime.getCurrentContext(), paired_obj, Block.NULL_BLOCK);
if(!((RubyHash)pair_list).isEmpty()) {
return;
}
}
}
((RubyHash)list).delete(runtime.getCurrentContext(), obj, Block.NULL_BLOCK);
}
代码示例来源:origin: org.kill-bill.billing/killbill-osgi-bundles-jruby
private void recursivePop(IRubyObject list, IRubyObject obj, IRubyObject paired_obj) {
if(paired_obj != null) {
IRubyObject pair_list = ((RubyHash)list).fastARef(obj);
if(pair_list == null) {
throw newTypeError("invalid inspect_tbl pair_list for " + getCurrentContext().getFrameName());
}
if(pair_list instanceof RubyHash) {
((RubyHash)pair_list).delete(getCurrentContext(), paired_obj, Block.NULL_BLOCK);
if(!((RubyHash)pair_list).isEmpty()) {
return;
}
}
}
((RubyHash)list).delete(getCurrentContext(), obj, Block.NULL_BLOCK);
}
代码示例来源:origin: org.kill-bill.billing/killbill-osgi-bundles-jruby
if (options == null || (options != null && options.isEmpty())) {
if (offset.isNil()) {
mode |= ModeFlags.WRONLY;
内容来源于网络,如有侵权,请联系作者删除!