Package org.jruby
Class RubyGlobal.StringOnlyRubyHash
java.lang.Object
org.jruby.RubyBasicObject
org.jruby.RubyObject
org.jruby.RubyHash
org.jruby.RubyGlobal.StringOnlyRubyHash
- All Implemented Interfaces:
Serializable
,Cloneable
,Comparable<IRubyObject>
,Map
,InstanceVariables
,InternalVariables
,IRubyObject
,CoreObjectType
- Direct Known Subclasses:
RubyGlobal.CaseInsensitiveStringOnlyRubyHash
- Enclosing class:
RubyGlobal
A Pseudo-hash whose keys and values are required to be Strings.
On all platforms, the keys are case-sensitive.
Used for ENV_JAVA.
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class org.jruby.RubyHash
RubyHash.RubyHashEntry, RubyHash.Visitor, RubyHash.VisitorWithState<T>, RubyHash.VisitorWithStateI
Nested classes/interfaces inherited from class org.jruby.RubyObject
RubyObject.Data
Nested classes/interfaces inherited from class org.jruby.RubyBasicObject
RubyBasicObject.Finalizer
-
Field Summary
Fields inherited from class org.jruby.RubyHash
COMPARE_BY_IDENTITY_F, DEFAULT_INSPECT_STR_SIZE, MRI_PRIMES, NO_ENTRY, RUBY2_KEYWORD_F, size, StoreValueVisitor
Fields inherited from class org.jruby.RubyObject
IVAR_INSPECTING_OBJECT_ALLOCATOR, OBJECT_ALLOCATOR, REIFYING_OBJECT_ALLOCATOR
Fields inherited from class org.jruby.RubyBasicObject
ALL_F, BASICOBJECT_ALLOCATOR, ERR_INSECURE_SET_INST_VAR, FALSE_F, FL_USHIFT, flags, FROZEN_F, IS_OVERLAID_F, metaClass, NEVER, NIL_F, REFINED_MODULE_F, STAMP_OFFSET, TAINTED_F, UNDEF, USER0_F, USER1_F, USER2_F, USER3_F, USER4_F, USER5_F, USER6_F, USER7_F, USER8_F, USER9_F, USERA_F, VAR_TABLE_OFFSET, varTable, varTableStamp
Fields inherited from interface org.jruby.runtime.builtin.IRubyObject
NULL_ARRAY
-
Constructor Summary
ConstructorsConstructorDescriptionStringOnlyRubyHash
(Ruby runtime, Map<RubyString, RubyString> valueMap, IRubyObject defaultValue) StringOnlyRubyHash
(Ruby runtime, Map<RubyString, RubyString> valueMap, IRubyObject defaultValue, boolean updateRealENV) -
Method Summary
Modifier and TypeMethodDescriptionprotected RubyString
getCorrectKey
(RubyString key) protected IRubyObject
internalGet
(IRubyObject key) protected boolean
protected static boolean
isStringLike
(IRubyObject obj) protected static IRubyObject
newName
(ThreadContext context, IRubyObject key, IRubyObject valueArg) protected static IRubyObject
newString
(ThreadContext context, RubyString value) protected static IRubyObject
newString
(ThreadContext context, RubyString value, org.jcodings.Encoding encoding) protected static IRubyObject
newString
(ThreadContext context, IRubyObject obj) op_aset
(ThreadContext context, IRubyObject key, IRubyObject value) Set a key/value pair into this hash.to_hash
(ThreadContext context) rb_hash_to_hashprotected static IRubyObject
verifyStringLike
(ThreadContext context, IRubyObject test) Methods inherited from class org.jruby.RubyHash
addAll, allSymbols, any_p, any_p, any_p, any_p_i, any_p_i_fast, any_p_p, appendAssociation, aref, aset, assoc, checkIterating, clear, compact, compact_bang, compare, compare_by_identity, compare_by_identity_p, containsKey, containsValue, convertToHash, create, createHashClass, deconstruct_keys, default_proc, default_proc, default_value_get, default_value_get, default_value_get, default_value_set, default_value_set, delete, delete, delete, delete_if, delete_ifInternal, dig, dig, dig, dig, directEntrySet, directKeySet, directValues, dup, dupFast, each, each_key, each_keyCommon, each_pair, each_pairCommon, each_pairCommon, each_value, each_valueCommon, eachCommon, empty_p, empty_p, entrySet, equals, except, fastARef, fastASet, fastASet, fastASetCheckString, fastASetSmall, fastASetSmall, fastASetSmallCheckString, fastASetSmallPair, fastDelete, fetch, fetch, fetch, fetch_values, flatten, flatten, get, getIfNone, getJavaClass, getNativeClassIndex, has_key_p, has_key_p, has_value_p, hasDefaultProc, hash, hashValue, hasKey, initialize, initialize, initialize, initialize, initialize_copy, inspect, inspectHash, internalDelete, internalDeleteEntry, internalGetEntry, internalJavaPut, internalPut, internalPutNoResize, internalPutSmall, invert, isComparedByIdentity, isEmpty, isRuby2KeywordHash, keep_if, keep_ifCommon, key, keys, keys, keySet, marshalTo, marshalTo, merge, merge, merge_bang, merge_bang, modify, newHash, newHash, newHash, newKwargs, newSmallHash, op_aref, op_aset, op_asetForString, op_asetSmallForString, op_eql, op_equal, op_ge, op_gt, op_le, op_lt, put, putAll, rassoc, rb_clear, rb_clear, rb_size, rb_size, rb_values, rb_values, rbClone, rbClone, rehash, rehash, reject, reject_bang, reject_bangInternal, rejectInternal, remove, replace, replaceExternally, replaceWith, ruby2_keywords_hash, ruby2_keywords_hash_p, select, select_bang, set_default_proc, set_default_proc, setComparedByIdentity, setRuby2KeywordHash, shift, size, slice, sort, to_a, to_a, to_h, to_h, to_h_block, to_hash, to_proc, to_s, transform_keys, transform_keys_bang, transform_values, transform_values_bang, try_convert, unmarshalFrom, unmarshalFrom, values, values, values_at, visitAll, visitAll, visitAll
Methods inherited from class org.jruby.RubyObject
attachToObjectSpace, callInit, callInit, callInit, callInit, callInit, callInit, callInit, callInit, callInit, callInit, convertToType, dig, dig1, dig2, eqlInternal, equalInternal, finishObjectClass, hashCode, inspect, op_eqq, puts, specificEval, toRubyString, toString
Methods inherited from class org.jruby.RubyBasicObject
addFinalizer, addFinalizer, anyToString, asJavaString, asString, callMethod, callMethod, callMethod, callMethod, callMethod, callMethod, callMethod, callMethod, callMethod, callSuper, checkArrayType, checkCallMethod, checkCallMethod, checkFrozen, checkStringType, cloneSetup, compareTo, convertToArray, convertToFloat, convertToInteger, convertToInteger, convertToInteger, convertToString, copyInstanceVariablesInto, copySpecialInstanceVariables, dataGetStruct, dataGetStructChecked, dataWrapStruct, decode, display, dup, dupFinalizer, dupSetup, ensureInstanceVariablesSettable, eql, eql_p, eql_p, equal_p, evalUnder, extend, fastGetInstanceVariable, fastGetInternalVariable, fastHasInstanceVariable, fastHasInternalVariable, fastSetInstanceVariable, fastSetInternalVariable, finishBasicObjectClass, forEachInstanceVariable, forEachInstanceVariableName, freeze, frozen_p, getCurrentContext, getFFIHandle, getFlag, getInstanceEvalClass, getInstanceEvalClass, getInstanceVariable, getInstanceVariableList, getInstanceVariableNameList, getInstanceVariables, getInternalVariable, getInternalVariables, getMarshalVariableList, getMetaClass, getMetaClass, getNativeHandle, getNativeTypeIndex, getObjectId, getRuntime, getSingletonClass, getSingletonClassClone, getSingletonClassCloneAndAttach, getSingletonClassCloneAndAttach, getType, getVariable, getVariableCount, getVariableList, getVariableNameList, hash, 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, isUntrusted, kind_of_p, makeMetaClass, makeMetaClass, makeMetaClassBootstrap, method, method, method, method_missing, methods, 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, respond_to_p, respondsTo, respondsToMissing, respondsToMissing, send, send, send, send, send, setFFIHandle, setFlag, setFrozen, setInstanceVariable, setInternalVariable, setMetaClass, setNativeHandle, setTaint, setUntrusted, setVariable, singleton_method, singleton_method, singleton_method_added, singleton_method_removed, singleton_method_undefined, singleton_methods, singletonClass, specificEval, specificEval, specificEval, specificEval, syncVariables, syncVariables, taint, taint, tainted_p, testFrozen, testFrozen, to_s, toJava, trust, type, untaint, untrust, untrusted_p, validateInstanceVariable, validateInstanceVariable, validateInstanceVariable, variableTableContains, variableTableFastContains, variableTableFastFetch, variableTableFastStore, variableTableFetch, variableTableRemove, variableTableStore, variableTableSync, yieldUnder, yieldUnder
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.jruby.runtime.builtin.IRubyObject
checkStringType19, marshalLiveVariables
Methods inherited from interface java.util.Map
compute, computeIfAbsent, computeIfPresent, forEach, getOrDefault, hashCode, merge, putIfAbsent, remove, replace, replace, replaceAll
-
Constructor Details
-
StringOnlyRubyHash
public StringOnlyRubyHash(Ruby runtime, Map<RubyString, RubyString> valueMap, IRubyObject defaultValue, boolean updateRealENV) -
StringOnlyRubyHash
public StringOnlyRubyHash(Ruby runtime, Map<RubyString, RubyString> valueMap, IRubyObject defaultValue)
-
-
Method Details
-
isCaseSensitive
protected boolean isCaseSensitive() -
to_hash
Description copied from class:RubyHash
rb_hash_to_hash -
internalGet
- Overrides:
internalGet
in classRubyHash
-
op_aset
Description copied from class:RubyHash
Set a key/value pair into this hash. -
verifyStringLike
-
isStringLike
-
getCorrectKey
-
newName
-
newString
protected static IRubyObject newString(ThreadContext context, RubyString value, org.jcodings.Encoding encoding) -
newString
-
newString
-