java.lang.Object
org.jruby.RubyBasicObject
org.jruby.RubyObject
org.jruby.RubyHash
org.jruby.RubyHashLinkedBuckets
- All Implemented Interfaces:
Serializable,Cloneable,Comparable<IRubyObject>,Map,InstanceVariables,InternalVariables,IRubyObject,CoreObjectType
- Direct Known Subclasses:
RubyGlobal.StringOnlyRubyHash
Implementation of the Hash class.
Concurrency: no synchronization is required among readers, but
all users must synchronize externally with writers.
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class org.jruby.RubyHash
RubyHash.RubyHashEntry, RubyHash.Visitor, RubyHash.VisitorIOException, RubyHash.VisitorWithState<T>, RubyHash.VisitorWithStateINested classes/interfaces inherited from class org.jruby.RubyObject
RubyObject.DataNested classes/interfaces inherited from class org.jruby.RubyBasicObject
RubyBasicObject.Finalizer -
Field Summary
FieldsFields inherited from class org.jruby.RubyHash
COMPARE_BY_IDENTITY, DEFAULT_INSPECT_STR_SIZE, NO_ENTRY, NULL_ENTRY, PROCDEFAULT_HASH, RUBY2_KEYWORD, state, StoreValueVisitorFields inherited from class org.jruby.RubyObject
IVAR_INSPECTING_OBJECT_ALLOCATOR, OBJECT_ALLOCATOR, REIFYING_OBJECT_ALLOCATORFields inherited from class org.jruby.RubyBasicObject
ALL_F, BASICOBJECT_ALLOCATOR, ERR_INSECURE_SET_INST_VAR, FALSE_F, flags, FROZEN_F, metaClass, NEVER, NIL_F, STAMP_OFFSET, TAINTED_F, UNDEF, VAR_TABLE_OFFSET, varTable, varTableStampFields inherited from interface org.jruby.runtime.builtin.IRubyObject
NULL_ARRAY -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedRubyHashLinkedBuckets(Ruby runtime) protectedRubyHashLinkedBuckets(Ruby runtime, int buckets) protectedRubyHashLinkedBuckets(Ruby runtime, RubyClass klass) protectedRubyHashLinkedBuckets(Ruby runtime, RubyClass metaClass, IRubyObject defaultValue, RubyHash.RubyHashEntry[] initialTable, int threshold) protectedRubyHashLinkedBuckets(Ruby runtime, IRubyObject defaultValue) protectedRubyHashLinkedBuckets(Ruby runtime, IRubyObject defaultValue, int buckets) -
Method Summary
Modifier and TypeMethodDescriptionvoidaddAll(ThreadContext context, RubyHash otherHash) <T> booleanany_p(ThreadContext context, Block block) any_p(ThreadContext context, IRubyObject pattern, Block block) protected IRubyObjectany_p_i(ThreadContext context, Block block) protected IRubyObjectany_p_i_fast(ThreadContext context, Block block) protected IRubyObjectany_p_p(ThreadContext context, IRubyObject pattern) protected voidappendAssociation(boolean keyIsSymbol, ByteList bytes) Append appropriate characters to indicate association (": " vs " => ").assoc(ThreadContext context, IRubyObject obj) protected final voidvoidclear()compact(ThreadContext context) compact_bang(ThreadContext context) compare(ThreadContext context, RubyHash.VisitorWithState<RubyHash> visitor, IRubyObject other, boolean eql) compare_by_identity(ThreadContext context) compare_by_identity_p(ThreadContext context) booleancontainsKey(Object key) booleancontainsValue(Object value) Tries to convert this object to a Ruby Hash using the "to_hash" method.deconstruct_keys(ThreadContext context, IRubyObject _arg1) default_proc(ThreadContext context) rb_hash_default_procdefault_value_get(ThreadContext context) default_value_get(ThreadContext context, IRubyObject arg) default_value_set(ThreadContext context, IRubyObject defaultValue) rb_hash_set_defaultdelete(IRubyObject key) Delete entry or null.delete(ThreadContext context, IRubyObject key) delete(ThreadContext context, IRubyObject key, Block block) rb_hash_deletedelete_if(ThreadContext context, Block block) delete_ifInternal(ThreadContext context, Block block) rb_hash_delete_ifdig(ThreadContext context, IRubyObject arg0) dig(ThreadContext context, IRubyObject[] args) dig(ThreadContext context, IRubyObject arg0, IRubyObject arg1) dig(ThreadContext context, IRubyObject arg0, IRubyObject arg1, IRubyObject arg2) dup(ThreadContext context) RubyMethod dup.dupFast(ThreadContext context) A lightweight dup for internal use that does not dispatch to initialize_copy nor rehash the keys.each(ThreadContext context, Block block) each_key(ThreadContext context, Block block) each_keyCommon(ThreadContext context, Block block) rb_hash_each_keyeach_pairCommon(ThreadContext context, Block block) rb_hash_each_paireach_value(ThreadContext context, Block block) each_valueCommon(ThreadContext context, Block block) rb_hash_each_valueeachCommon(ThreadContext context, Block block) rb_hash_eachempty_p(ThreadContext context) rb_hash_empty_pentrySet()booleanThis override does not do a "checked" dispatch.except(ThreadContext context, IRubyObject[] keys) final IRubyObjectfastARef(IRubyObject key) final voidfastASet(Ruby runtime, IRubyObject key, IRubyObject value, boolean prepareString) final voidfastASet(IRubyObject key, IRubyObject value) final voidfastASetCheckString(Ruby runtime, IRubyObject key, IRubyObject value) final voidfastASetSmall(Ruby runtime, IRubyObject key, IRubyObject value, boolean prepareString) final voidfastASetSmall(IRubyObject key, IRubyObject value) final voidfastASetSmallCheckString(Ruby runtime, IRubyObject key, IRubyObject value) final voidfastASetSmallPair(ThreadContext context, IRubyObject _pair) final booleanfastDelete(IRubyObject key) fetch(ThreadContext context, IRubyObject[] args, Block block) rb_hash_fetchfetch(ThreadContext context, IRubyObject key, Block block) fetch(ThreadContext context, IRubyObject key, IRubyObject _default, Block block) fetch_values(ThreadContext context, IRubyObject[] args, Block block) flatten(ThreadContext context) flatten(ThreadContext context, IRubyObject level) protected booleanget(int flag) Will return the Java interface that most closely can represent this object, when working through Java integration translations.has_key_p(ThreadContext context, IRubyObject key) rb_hash_has_keyhas_value_p(ThreadContext context, IRubyObject expected) rb_hash_has_valuebooleanhash(ThreadContext context) Will return the hash code of this object.protected final inthashValue(IRubyObject key) booleanhasKey(IRubyObject key) A Java API to test the presence of a (Ruby) key in the Hashinitialize(ThreadContext context, Block block) rb_hash_initializeinitialize(ThreadContext context, IRubyObject _default, Block block) initialize(ThreadContext context, IRubyObject _default, IRubyObject hash, Block block) initialize_copy(ThreadContext context, IRubyObject other) Initializes this object as a copy of the original, that is the parameter to this object.inspect(ThreadContext context) rb_hash_inspectprotected RubyStringinspectHash(ThreadContext context) inspect_hashprotected RubyHash.RubyHashEntryprotected RubyHash.RubyHashEntryprotected IRubyObjectinternalGet(IRubyObject key) protected RubyHash.RubyHashEntryinternalPut(IRubyObject key, IRubyObject value) protected IRubyObjectinternalPutNoResize(IRubyObject key, IRubyObject value, boolean checkForExisting) invert(ThreadContext context) rb_hash_invertbooleanIs this object compared by identity or not?booleanisEmpty()booleankeep_if(ThreadContext context, Block block) booleankeep_ifCommon(ThreadContext context, Block block) key(ThreadContext context, IRubyObject expected) final RubyArraykeys()keys(ThreadContext context) rb_hash_keyskeySet()static voidmarshalTo(ThreadContext context, RubyOutputStream out, RubyHashLinkedBuckets hash, MarshalDumper output) merge(ThreadContext context, IRubyObject[] others, Block block) rb_hash_mergemerge_bang(ThreadContext context, IRubyObject[] others, Block block) rb_hash_updatevoidmodify()rb_hash_modifystatic RubyHashLinkedBucketsstatic RubyHashLinkedBucketsstatic RubyHashLinkedBucketsstatic RubyHashLinkedBucketsnewLBHash(Ruby runtime, IRubyObject defaultValue) static RubyHashLinkedBucketsnewLBHash(Ruby runtime, IRubyObject defaultValue, int buckets) op_aref(ThreadContext context, IRubyObject key) rb_hash_arefop_aset(ThreadContext context, IRubyObject key, IRubyObject value) Set a key/value pair into this hash.protected voidop_asetForString(Ruby runtime, RubyString key, IRubyObject value) protected voidop_asetSmallForString(Ruby runtime, RubyString key, IRubyObject value) op_eql(ThreadContext context, IRubyObject other) rb_hash_eqlop_equal(ThreadContext context, IRubyObject other) rb_hash_equalop_ge(ThreadContext context, IRubyObject other) op_gt(ThreadContext context, IRubyObject other) op_le(ThreadContext context, IRubyObject other) op_lt(ThreadContext context, IRubyObject other) voidrassoc(ThreadContext context, IRubyObject obj) rb_clear(ThreadContext context) rb_hash_clearrb_size(ThreadContext context) rb_hash_sizefinal RubyArrayrb_values(ThreadContext context) rbClone(ThreadContext context) rbClone(ThreadContext context, IRubyObject opts) rehash(ThreadContext context) rb_hash_rehashreject(ThreadContext context, Block block) reject_bang(ThreadContext context, Block block) reject_bangInternal(ThreadContext context, Block block) rb_hash_reject_bangrejectInternal(ThreadContext context, Block block) rb_hash_rejectreplace(ThreadContext context, IRubyObject other) rb_hash_replaceprotected voidreplaceExternally(ThreadContext context, RubyHash otherHash) protected voidreplaceWith(ThreadContext context, RubyHash otherHash) static IRubyObjectruby2_keywords_hash(ThreadContext context, IRubyObject _self, IRubyObject arg) static IRubyObjectruby2_keywords_hash_p(ThreadContext context, IRubyObject _self, IRubyObject arg) select(ThreadContext context, Block block) rb_hash_selectselect_bang(ThreadContext context, Block block) protected voidset(int flag, boolean set) set_default_proc(ThreadContext context, IRubyObject proc) rb_hash_set_default_procvoidsetComparedByIdentity(boolean comparedByIdentity) Sets whether this object is compared by identity or not.voidsetRuby2KeywordHash(boolean value) shift(ThreadContext context) rb_hash_shiftintsize()slice(ThreadContext context, IRubyObject[] args) rb_hash_sliceto_a(ThreadContext context) rb_hash_to_ato_h(ThreadContext context, Block block) protected RubyHashto_h_block(ThreadContext context, Block block) to_hash(ThreadContext context) rb_hash_to_hashto_proc(ThreadContext context) to_s(ThreadContext context) rb_hash_to_s & to_s_hashtransform_keys(ThreadContext context, IRubyObject[] args, Block block) transform_keys_bang(ThreadContext context, IRubyObject[] args, Block block) transform_values(ThreadContext context, Block block) transform_values_bang(ThreadContext context, Block block) static RubyHashunmarshalFrom(ThreadContext context, RubyInputStream in, MarshalLoader input, boolean defaultValue, boolean identity) values()values(ThreadContext context) rb_hash_valuesvalues_at(ThreadContext context, IRubyObject[] args) rb_hash_values_at<T> voidvisitAll(ThreadContext context, RubyHash.VisitorWithStateI visitor) <T> voidvisitAll(ThreadContext context, RubyHash.VisitorWithState visitor, T state) protected <T> voidvisitLimited(ThreadContext context, RubyHash.VisitorWithState visitor, long size, T state) withRuby2Keywords(boolean ruby2Keywords) Methods inherited from class org.jruby.RubyHash
create, createHashClass, getNativeClassIndex, marshalTo, marshalTo, newHash, newHash, newHash, newKwargs, newSmallHash, try_convert, unmarshalFrom, visitAllMethods inherited from class org.jruby.RubyObject
attachToObjectSpace, callInit, callInit, callInit, callInit, callInit, callInit, callInit, callInit, callInit, callInit, dig, dig1, dig2, eqlInternal, equalInternal, finishObjectClass, hashCode, inspect, op_eqq, puts, toRubyString, toStringMethods inherited from class org.jruby.RubyBasicObject
__id__, addFinalizer, addFinalizer, anyToString, asJavaString, asString, callMethod, callMethod, callMethod, callMethod, callMethod, callMethod, callMethod, checkArrayType, checkCallMethod, checkCallMethod, checkFrozen, checkStringType, cloneSetup, compareTo, convertToArray, convertToFloat, convertToInteger, convertToInteger, convertToString, copyInstanceVariablesInto, copySpecialInstanceVariables, dataGetStruct, dataWrapStruct, decode, display, dup, dupFinalizer, dupSetup, ensureInstanceVariablesSettable, eql, eql_p, eql_p, equal_p, evalUnder, extend, finishBasicObjectClass, forEachInstanceVariable, forEachInstanceVariableName, freeze, frozen_p, getCurrentContext, getFFIHandle, getFlag, getInstanceEvalClass, getInstanceEvalClass, getInstanceVariable, getInstanceVariableList, getInstanceVariableNameList, getInstanceVariables, getInternalVariable, getInternalVariables, getMarshalVariableList, getMetaClass, getMetaClass, getObjectId, getRuntime, getSingletonClass, getSingletonClassClone, getSingletonClassCloneAndAttach, getSingletonClassCloneAndAttach, getType, getVariable, getVariableList, getVariableNameList, hash, hashyInspect, hashyInspect, hasInstanceVariable, hasInstanceVariables, hasInternalVariable, hasVariables, id, infectBy, initialize, initialize_copy, inspect, inspectHashCode, instance_eval, instance_eval, instance_eval, instance_eval, instance_eval, instance_exec, instance_of_p, instance_variable_defined_p, instance_variable_get, instance_variable_set, instance_variables, isBuiltin, isClass, isFalse, isFrozen, isImmediate, isModule, isNil, isSpecialConst, isSpecialObject, isTaint, isTrue, kind_of_p, makeMetaClass, makeMetaClass, makeMetaClassBootstrap, method, method, method, method_missing, methods, nil_p, nonFixnumHashCode, nonFixnumHashCode, OBJ_INIT_COPY, objInitCopy, op_cmp, op_match, op_not, op_not_equal, op_not_match, private_methods, protected_methods, public_methods, rbClone, rbInspect, remove_instance_variable, removeFinalizers, removeInstanceVariable, removeInternalVariable, respond_to_p, respondsTo, respondsToMissing, respondsToMissing, send, send, send, send, send, setFFIHandle, setFlag, setFrozen, setInstanceVariable, setInternalVariable, setMetaClass, setTaint, setVariable, singleton_method, singleton_method, singleton_method_added, singleton_method_removed, singleton_method_undefined, singleton_methods, singletonClass, specificEval, specificEval, specificEval, specificEval, syncVariables, taint, taint, tainted_p, testFrozen, testFrozen, to_s, toJava, type, untaint, validateInstanceVariable, variableTableContains, variableTableFetch, variableTableRemove, variableTableStore, variableTableSync, yieldUnder, yieldUnderMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.jruby.runtime.builtin.IRubyObject
checkStringType19, marshalLiveVariablesMethods inherited from interface java.util.Map
compute, computeIfAbsent, computeIfPresent, forEach, getOrDefault, hashCode, merge, putIfAbsent, remove, replace, replace, replaceAll
-
Field Details
-
size
protected int size -
MRI_PRIMES
public static final int[] MRI_PRIMES
-
-
Constructor Details
-
RubyHashLinkedBuckets
-
RubyHashLinkedBuckets
-
RubyHashLinkedBuckets
-
RubyHashLinkedBuckets
-
RubyHashLinkedBuckets
-
RubyHashLinkedBuckets
protected RubyHashLinkedBuckets(Ruby runtime, RubyClass metaClass, IRubyObject defaultValue, RubyHash.RubyHashEntry[] initialTable, int threshold)
-
-
Method Details
-
newLBHash
-
newLBHash
-
newLBHash
-
newLBHash
-
newLBHash
-
set
protected void set(int flag, boolean set) -
get
protected boolean get(int flag) -
hashValue
-
checkIterating
protected final void checkIterating() -
internalPut
- Overrides:
internalPutin classRubyHash
-
internalPutNoResize
protected IRubyObject internalPutNoResize(IRubyObject key, IRubyObject value, boolean checkForExisting) -
internalGet
- Overrides:
internalGetin classRubyHash
-
internalGetEntry
-
internalDelete
-
internalDeleteEntry
-
visitAll
-
visitAll
-
visitLimited
protected <T> void visitLimited(ThreadContext context, RubyHash.VisitorWithState visitor, long size, T state) - Overrides:
visitLimitedin classRubyHash
-
allSymbols
public <T> boolean allSymbols()- Overrides:
allSymbolsin classRubyHash
-
initialize
rb_hash_initialize- Overrides:
initializein classRubyHash
-
initialize
- Overrides:
initializein classRubyHash
-
initialize
public IRubyObject initialize(ThreadContext context, IRubyObject _default, IRubyObject hash, Block block) - Overrides:
initializein classRubyHash
-
default_value_get
- Overrides:
default_value_getin classRubyHash
-
default_value_get
- Overrides:
default_value_getin classRubyHash
-
default_value_set
rb_hash_set_default- Overrides:
default_value_setin classRubyHash
-
default_proc
rb_hash_default_proc- Overrides:
default_procin classRubyHash
-
set_default_proc
rb_hash_set_default_proc- Overrides:
set_default_procin classRubyHash
-
modify
public void modify()rb_hash_modify -
inspectHash
inspect_hash -
appendAssociation
Append appropriate characters to indicate association (": " vs " => ").- Parameters:
keyIsSymbol- is the key a symbolbytes- buffer to which to append
-
inspect
rb_hash_inspect- Specified by:
inspectin interfaceIRubyObject- Overrides:
inspectin classRubyHash
-
rb_size
rb_hash_size -
empty_p
rb_hash_empty_p -
to_a
rb_hash_to_a -
to_s
rb_hash_to_s & to_s_hash -
rehash
rb_hash_rehash -
to_hash
rb_hash_to_hash -
to_h
-
to_h_block
- Overrides:
to_h_blockin classRubyHash
-
convertToHash
Description copied from class:RubyBasicObjectTries to convert this object to a Ruby Hash using the "to_hash" method.- Specified by:
convertToHashin interfaceIRubyObject- Overrides:
convertToHashin classRubyHash- Returns:
- hash representation of this
-
fastASet
-
fastASetSmall
- Overrides:
fastASetSmallin classRubyHash
-
fastASetSmallPair
- Overrides:
fastASetSmallPairin classRubyHash
-
fastASetCheckString
- Overrides:
fastASetCheckStringin classRubyHash
-
fastASetSmallCheckString
- Overrides:
fastASetSmallCheckStringin classRubyHash
-
fastASet
-
fastASetSmall
public final void fastASetSmall(Ruby runtime, IRubyObject key, IRubyObject value, boolean prepareString) - Overrides:
fastASetSmallin classRubyHash
-
op_aset
Set a key/value pair into this hash. -
op_asetForString
-
op_asetSmallForString
-
fastARef
-
compare
public RubyBoolean compare(ThreadContext context, RubyHash.VisitorWithState<RubyHash> visitor, IRubyObject other, boolean eql) -
op_equal
rb_hash_equal- Specified by:
op_equalin interfaceIRubyObject- Overrides:
op_equalin classRubyHash
-
op_eql
rb_hash_eql -
op_aref
rb_hash_aref -
op_lt
-
op_le
-
op_gt
-
op_ge
-
hash
Description copied from class:RubyBasicObjectWill return the hash code of this object. In comparison to MRI, this method will use the Java identity hash code instead of using rb_obj_id, since the usage of id in JRuby will incur the cost of some. ObjectSpace maintenance. -
fetch
rb_hash_fetch -
except
-
fetch
-
fetch
-
has_key_p
rb_hash_has_key -
hasKey
A Java API to test the presence of a (Ruby) key in the Hash -
has_value_p
rb_hash_has_value- Overrides:
has_value_pin classRubyHash
-
eachCommon
rb_hash_each- Overrides:
eachCommonin classRubyHash
-
each
-
each_pairCommon
rb_hash_each_pair- Overrides:
each_pairCommonin classRubyHash
-
each_valueCommon
rb_hash_each_value- Overrides:
each_valueCommonin classRubyHash
-
each_value
- Overrides:
each_valuein classRubyHash
-
each_keyCommon
rb_hash_each_key- Overrides:
each_keyCommonin classRubyHash
-
each_key
-
transform_keys
- Overrides:
transform_keysin classRubyHash
-
transform_values
- Overrides:
transform_valuesin classRubyHash
-
transform_keys_bang
- Overrides:
transform_keys_bangin classRubyHash
-
transform_values_bang
- Overrides:
transform_values_bangin classRubyHash
-
select_bang
- Overrides:
select_bangin classRubyHash
-
keep_if
-
keep_ifCommon
- Overrides:
keep_ifCommonin classRubyHash
-
key
-
keys
rb_hash_keys -
keys
-
values
rb_hash_values -
rb_values
-
shift
rb_hash_shift -
fastDelete
- Overrides:
fastDeletein classRubyHash
-
delete
rb_hash_delete -
delete
Delete entry or null. -
delete
-
select
rb_hash_select -
slice
rb_hash_slice -
delete_ifInternal
rb_hash_delete_if- Overrides:
delete_ifInternalin classRubyHash
-
delete_if
-
rejectInternal
rb_hash_reject- Overrides:
rejectInternalin classRubyHash
-
reject
-
reject_bangInternal
rb_hash_reject_bang- Overrides:
reject_bangInternalin classRubyHash
-
reject_bang
- Overrides:
reject_bangin classRubyHash
-
rb_clear
rb_hash_clear -
invert
rb_hash_invert -
merge_bang
rb_hash_update- Overrides:
merge_bangin classRubyHash
-
addAll
-
merge
rb_hash_merge -
initialize_copy
Description copied from class:RubyBasicObjectInitializes this object as a copy of the original, that is the parameter to this object. Will make sure that the argument actually has the same real class as this object. It shouldn't be possible to initialize an object with something totally different.- Overrides:
initialize_copyin classRubyHash- Parameters:
context- the thread contextother- the original- Returns:
- a copy unless the same thing
-
replace
rb_hash_replace -
replaceWith
-
replaceExternally
-
values_at
rb_hash_values_at -
fetch_values
- Overrides:
fetch_valuesin classRubyHash
-
assoc
-
rassoc
-
flatten
-
flatten
-
compact
-
compact_bang
- Overrides:
compact_bangin classRubyHash
-
compare_by_identity
- Overrides:
compare_by_identityin classRubyHash
-
compare_by_identity_p
- Overrides:
compare_by_identity_pin classRubyHash
-
dup
Description copied from interface:IRubyObjectRubyMethod dup.- Specified by:
dupin interfaceIRubyObject- Overrides:
dupin classRubyHash- Parameters:
context- the thread context- Returns:
- a dup-ed object
-
rbClone
-
rbClone
-
any_p
-
any_p
-
any_p_i
-
any_p_i_fast
-
any_p_p
-
dupFast
A lightweight dup for internal use that does not dispatch to initialize_copy nor rehash the keys. Intended for use in dup'ing keyword args for processing. -
withRuby2Keywords
- Overrides:
withRuby2Keywordsin classRubyHash
-
hasDefaultProc
public boolean hasDefaultProc()- Overrides:
hasDefaultProcin classRubyHash
-
getIfNone
-
deconstruct_keys
- Overrides:
deconstruct_keysin classRubyHash
-
dig
-
dig
-
dig
-
dig
-
to_proc
-
ruby2_keywords_hash
public static IRubyObject ruby2_keywords_hash(ThreadContext context, IRubyObject _self, IRubyObject arg) -
ruby2_keywords_hash_p
public static IRubyObject ruby2_keywords_hash_p(ThreadContext context, IRubyObject _self, IRubyObject arg) -
marshalTo
public static void marshalTo(ThreadContext context, RubyOutputStream out, RubyHashLinkedBuckets hash, MarshalDumper output) -
unmarshalFrom
public static RubyHash unmarshalFrom(ThreadContext context, RubyInputStream in, MarshalLoader input, boolean defaultValue, boolean identity) -
getJavaClass
Description copied from class:RubyBasicObjectWill return the Java interface that most closely can represent this object, when working through Java integration translations.- Specified by:
getJavaClassin interfaceIRubyObject- Overrides:
getJavaClassin classRubyHash- Returns:
- the true Java class of this (Ruby) object
-
size
public int size() -
isEmpty
public boolean isEmpty() -
containsKey
- Specified by:
containsKeyin interfaceMap- Overrides:
containsKeyin classRubyHash
-
containsValue
- Specified by:
containsValuein interfaceMap- Overrides:
containsValuein classRubyHash
-
get
-
put
-
remove
-
putAll
-
clear
public void clear() -
equals
Description copied from class:RubyObjectThis override does not do a "checked" dispatch. -
keySet
-
directKeySet
- Overrides:
directKeySetin classRubyHash
-
values
-
directValues
- Overrides:
directValuesin classRubyHash
-
entrySet
-
directEntrySet
- Overrides:
directEntrySetin classRubyHash
-
isComparedByIdentity
public boolean isComparedByIdentity()Is this object compared by identity or not?- Overrides:
isComparedByIdentityin classRubyHash- Returns:
- true if this object is compared by identity, false otherwise
-
setComparedByIdentity
public void setComparedByIdentity(boolean comparedByIdentity) Sets whether this object is compared by identity or not.- Overrides:
setComparedByIdentityin classRubyHash- Parameters:
comparedByIdentity- should this object be compared by identity?
-
isRuby2KeywordHash
public boolean isRuby2KeywordHash()- Overrides:
isRuby2KeywordHashin classRubyHash
-
setRuby2KeywordHash
public void setRuby2KeywordHash(boolean value) - Overrides:
setRuby2KeywordHashin classRubyHash
-