本文整理了Java中org.jruby.RubyHash.containsKey
方法的一些代码示例,展示了RubyHash.containsKey
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。RubyHash.containsKey
方法的具体详情如下:
包路径:org.jruby.RubyHash
类名称:RubyHash
方法名:containsKey
暂无
代码示例来源:origin: org.jruby/jruby-complete
@Override
public boolean contains(RubyHash hash, Object o) {
return hash.containsKey(o);
}
@Override
代码示例来源:origin: org.kill-bill.billing/killbill-osgi-bundles-jruby
public boolean contains(RubyHash hash, Object o) {
return hash.containsKey(o);
}
public boolean remove(RubyHash hash, Object o) {
代码示例来源:origin: org.jruby/jruby-core
@Override
public boolean contains(RubyHash hash, Object o) {
return hash.containsKey(o);
}
@Override
代码示例来源:origin: com.ning.billing/killbill-osgi-bundles-jruby
public boolean contains(RubyHash hash, Object o) {
return hash.containsKey(o);
}
public boolean remove(RubyHash hash, Object o) {
代码示例来源:origin: asciidoctor/asciidoctorj
@Override
public boolean containsKey(Object key) {
if (!(key instanceof String)) {
return false;
}
return rubyHash.containsKey(convertJavaToRubyKey((String) key));
}
代码示例来源:origin: org.asciidoctor/asciidoctorj
@Override
public boolean containsKey(Object key) {
if (!(key instanceof String)) {
return false;
}
return rubyHash.containsKey(convertJavaToRubyKey((String) key));
}
代码示例来源:origin: asciidoctor/asciidoctorj
@Override
public boolean containsKey(Object key) {
if (!(key instanceof String)) {
return false;
}
RubySymbol symbol = rubyHash.getRuntime().getSymbolTable().getSymbol((String) key);
return rubyHash.containsKey(symbol);
}
代码示例来源:origin: org.asciidoctor/asciidoctorj
@Override
public boolean containsKey(Object key) {
if (!(key instanceof String)) {
return false;
}
RubySymbol symbol = rubyHash.getRuntime().getSymbolTable().getSymbol((String) key);
return rubyHash.containsKey(symbol);
}
代码示例来源:origin: com.ning.billing/killbill-osgi-bundles-jruby
/**
* Warn when using unsupported options.
*
* @param options
*/
private static void checkUnsupportedOptions(IRubyObject options, Set<String> unsupported, String error) {
if (options == null || options.isNil() || !(options instanceof RubyHash)) return;
RubyHash optsHash = (RubyHash)options;
Ruby runtime = optsHash.getRuntime();
for (String key : unsupported) {
if (optsHash.containsKey(runtime.newSymbol(key))) {
runtime.getWarnings().warn(error + ": " + key);
}
}
}
代码示例来源:origin: org.kill-bill.billing/killbill-osgi-bundles-jruby
/**
* Warn when using unsupported options.
*
* @param options
*/
private static void checkUnsupportedOptions(IRubyObject options, Set<String> unsupported, String error) {
if (options == null || options.isNil() || !(options instanceof RubyHash)) return;
RubyHash optsHash = (RubyHash)options;
Ruby runtime = optsHash.getRuntime();
for (String key : unsupported) {
if (optsHash.containsKey(runtime.newSymbol(key))) {
runtime.getWarnings().warn(error + ": " + key);
}
}
}
代码示例来源:origin: aurorafeint/jruby-memcached
private RubyFixnum getTTL(ThreadContext context, IRubyObject[] args, int index) {
Ruby ruby = context.getRuntime();
if (args.length > index) {
if (args[index] instanceof RubyFixnum) {
return (RubyFixnum) args[index];
} else if (args[index] instanceof RubyHash) {
RubyHash options = (RubyHash) args[index];
if (options.containsKey(ruby.newSymbol("ttl"))) {
Long ttl = (Long) options.get(ruby.newSymbol("ttl"));
return ruby.newFixnum(ttl);
} else if (options.containsKey(ruby.newSymbol("expires_in"))) {
Long expiresIn = (Long) options.get(ruby.newSymbol("expires_in"));
return ruby.newFixnum(expiresIn);
}
}
}
return ruby.newFixnum(super.getDefaultTTL());
}
代码示例来源:origin: org.kill-bill.billing/killbill-osgi-bundles-jruby
if (options.containsKey(runtime.newSymbol("mode"))) {
ioOptions = parseIOOptions19(options.fastARef(runtime.newSymbol("mode")));
if (options.containsKey(runtime.newSymbol("binmode")) &&
options.fastARef(runtime.newSymbol("binmode")).isTrue()) {
if (options.containsKey(runtime.newSymbol("binmode")) &&
options.fastARef(runtime.newSymbol("binmode")).isTrue()) {
if (options.containsKey(runtime.newSymbol("textmode")) &&
options.fastARef(runtime.newSymbol("textmode")).isTrue()) {
if (options.containsKey(runtime.newSymbol("open_args"))) {
IRubyObject args = options.fastARef(runtime.newSymbol("open_args"));
代码示例来源:origin: com.ning.billing/killbill-osgi-bundles-jruby
if (options.containsKey(runtime.newSymbol("mode"))) {
ioOptions = parseIOOptions19(options.fastARef(runtime.newSymbol("mode")));
if (options.containsKey(runtime.newSymbol("binmode")) &&
options.fastARef(runtime.newSymbol("binmode")).isTrue()) {
if (options.containsKey(runtime.newSymbol("binmode")) &&
options.fastARef(runtime.newSymbol("binmode")).isTrue()) {
if (options.containsKey(runtime.newSymbol("textmode")) &&
options.fastARef(runtime.newSymbol("textmode")).isTrue()) {
if (options.containsKey(runtime.newSymbol("open_args"))) {
IRubyObject args = options.fastARef(runtime.newSymbol("open_args"));
代码示例来源:origin: org.kill-bill.billing/killbill-osgi-bundles-jruby
} else if (!options.containsKey(runtime.newSymbol("mode"))) {
mode |= ModeFlags.WRONLY;
file = (RubyIO) Helpers.invoke(context, runtime.getFile(), "new", path, RubyFixnum.newFixnum(runtime, mode), options);
代码示例来源:origin: com.ning.billing/killbill-osgi-bundles-jruby
} else if (!options.containsKey(runtime.newSymbol("mode"))) {
mode |= ModeFlags.WRONLY;
file = (RubyIO) Helpers.invoke(context, runtime.getFile(), "new", path, RubyFixnum.newFixnum(runtime, mode), options);
代码示例来源:origin: com.ning.billing/killbill-osgi-bundles-jruby
} else if (!options.containsKey(runtime.newSymbol("mode"))) {
mode |= ModeFlags.WRONLY;
file = (RubyIO) Helpers.invoke(context, runtime.getFile(), "new", path, RubyFixnum.newFixnum(runtime, mode), options);
代码示例来源:origin: org.kill-bill.billing/killbill-osgi-bundles-jruby
} else if (!options.containsKey(runtime.newSymbol("mode"))) {
mode |= ModeFlags.WRONLY;
file = (RubyIO) Helpers.invoke(context, runtime.getFile(), "new", path, RubyFixnum.newFixnum(runtime, mode), options);
内容来源于网络,如有侵权,请联系作者删除!