Top Description Inners Fields Constructors Methods
org.jruby.java.proxies

public final Class MapJavaProxy

extends ConcreteJavaProxy
Class Inheritance
Imports
org.jruby.Ruby, .RubyArray, .RubyBoolean, .RubyClass, .RubyFixnum, .RubyHash, .RubyProc, .RubyString, org.jruby.anno.JRubyMethod, org.jruby.exceptions.RaiseException, org.jruby.javasupport.JavaUtil, org.jruby.runtime.Block, .ThreadContext, .Visibility, org.jruby.runtime.builtin.IRubyObject, java.lang.reflect.InvocationTargetException, java.util.Collection, .Map, .Set, org.jruby.util.RubyStringBuilder, .TypeConverter

A proxy for wrapping java.util.Map instances.
Author
Yoko Harada

Nested and Inner Type Summary

Modifier and TypeClass and Description
private static class

Field Summary

Modifier and TypeField and Description
private MapJavaProxy.RubyHashMap

Constructor Summary

AccessConstructor and Description
public
MapJavaProxy(Ruby runtime, RubyClass klazz)

public
MapJavaProxy(Ruby runtime, RubyClass klazz, Map<K, V> map)

Method Summary

Modifier and TypeMethod and Description
public IRubyObject
any_p(ThreadContext context, Block block)

public IRubyObject
any_p(ThreadContext context, IRubyObject arg0, Block block)

public IRubyObject
any_p(ThreadContext context, IRubyObject[] args, Block block)
Deprecated

public IRubyObject
assoc(final ThreadContext context, final IRubyObject obj)

public IRubyObject
public IRubyObject
public final RubyHash
convertToHash()

Overrides org.jruby.RubyBasicObject.convertToHash.

Implements org.jruby.runtime.builtin.IRubyObject.convertToHash.

Tries to convert this object to a Ruby Hash using the "to_hash" method.

public static RubyClass
createMapJavaProxy(ThreadContext context, RubyClass _ConcreteJavaProxy)

The binding of the JRuby methods in this class are done when the java Map's proxy is being constructed.

public IRubyObject
default_proc(ThreadContext context)

rb_hash_default_proc

public IRubyObject
public IRubyObject
public IRubyObject
default_value_set(ThreadContext context, final IRubyObject defaultValue)

rb_hash_set_default

public IRubyObject
delete(ThreadContext context, IRubyObject key, Block block)

rb_hash_delete

public IRubyObject
delete_if(final ThreadContext context, final Block block)

rb_hash_delete_if

public IRubyObject
dig(ThreadContext context, IRubyObject[] args)

public IRubyObject
dig(ThreadContext context, IRubyObject arg0)

public IRubyObject
public IRubyObject
public IRubyObject
private MapJavaProxy
dupImpl(final String method)

public IRubyObject
each(final ThreadContext context, final Block block)

rb_hash_each

public IRubyObject
each_key(final ThreadContext context, final Block block)

rb_hash_each_key

public IRubyObject
each_value(final ThreadContext context, final Block block)

rb_hash_each_value

public RubyBoolean
empty_p(ThreadContext context)

rb_hash_empty_p

public IRubyObject
fetch(ThreadContext context, IRubyObject key, Block block)

rb_hash_fetch

public IRubyObject
fetch(ThreadContext context, IRubyObject key, IRubyObject _default, Block block)

public RubyArray<T extends IRubyObject>
fetch_values(ThreadContext context, IRubyObject[] args, Block block)

public IRubyObject
public IRubyObject
pack-priv final Map<K, V>
private MapJavaProxy.RubyHashMap
public RubyBoolean
has_key_p(ThreadContext context, IRubyObject key)

rb_hash_has_key_p

public RubyBoolean
has_value_p(ThreadContext context, IRubyObject expected)

rb_hash_has_value

public RubyFixnum
hash(ThreadContext
the current thread context
context
)

Overrides org.jruby.RubyBasicObject.hash.

rb_hash_hash

public IRubyObject
index(ThreadContext context, IRubyObject expected)

rb_hash_index

public RubyHash
initialize_copy(ThreadContext
the thread context
context
,
IRubyObject
the original
other
)

Overrides org.jruby.java.proxies.JavaProxy.initialize_copy.

rb_hash_initialize_copy

public IRubyObject
public RubyHash
invert(final ThreadContext context)

rb_hash_invert

public IRubyObject
keep_if(final ThreadContext context, final Block block)

rb_hash_keep_if

public IRubyObject
key(ThreadContext context, IRubyObject expected)

rb_hash_key

public RubyArray<T extends IRubyObject>
keys(ThreadContext context)

rb_hash_keys

public RubyHash
merge(ThreadContext context, IRubyObject other, Block block)
Deprecated

public RubyHash
merge(ThreadContext context, IRubyObject[] others, Block block)

rb_hash_merge

public RubyHash
merge_bang(final ThreadContext context, final IRubyObject other, final Block block)
Deprecated

public RubyHash
merge_bang(final ThreadContext context, final IRubyObject[] others, final Block block)

rb_hash_merge_bang

public IRubyObject
op_aref(ThreadContext context, IRubyObject key)

rb_hash_aref

public IRubyObject
op_aset(ThreadContext context, IRubyObject key, IRubyObject value)

rb_hash_aset

public IRubyObject
op_eql(final ThreadContext context, IRubyObject other)

rb_hash_eql

public IRubyObject
public IRubyObject
public IRubyObject
public IRubyObject
public IRubyObject
public IRubyObject
rassoc(final ThreadContext context, final IRubyObject obj)

public IRubyObject
rb_clear(ThreadContext context)

rb_hash_clear

public RubyFixnum
rb_size(ThreadContext context)

rb_hash_size

public RubyArray<T extends IRubyObject>
rb_values(ThreadContext context)

rb_hash_values

public IRubyObject
public RubyHash
rehash(ThreadContext context)

rb_hash_rehash

public IRubyObject
reject(final ThreadContext context, final Block block)

rb_hash_reject

public IRubyObject
reject_bang(final ThreadContext context, final Block block)

rb_hash_reject_bang

public RubyHash
replace(final ThreadContext context, IRubyObject other)

rb_hash_replace

public IRubyObject
select(final ThreadContext context, final Block block)

rb_hash_select

public IRubyObject
select_bang(final ThreadContext context, final Block block)

rb_hash_select_bang

public IRubyObject
set_default_proc(ThreadContext context, IRubyObject proc)

rb_hash_set_default_proc

public IRubyObject
shift(ThreadContext context)

rb_hash_shift

public IRubyObject
sort(ThreadContext context, Block block)
Deprecated

public RubyArray<T extends IRubyObject>
to_a(ThreadContext context)

Overrides org.jruby.RubyBasicObject.to_a.

rb_hash_to_a

public RubyHash
to_hash(ThreadContext context)

rb_hash_to_hash

public RubyProc
public IRubyObject
public RubyArray<T extends IRubyObject>
values_at(ThreadContext context, IRubyObject[] args)

rb_hash_values_at

Inherited from org.jruby.java.proxies.ConcreteJavaProxy:
createConcreteJavaProxyensureThisfindSuperLinefinishInitializeidinitializeinitializesplitInitializedtoJava