Class: Wiris::Hash
- Inherits:
-
Hash
- Object
- Hash
- Wiris::Hash
- Defined in:
- lib/src-generic/Hash.rb
Instance Method Summary collapse
- #exists(key) ⇒ Object
- #get(key) ⇒ Object
- #getJavaHashtable ⇒ Object
-
#initialize(hs = nil) ⇒ Hash
constructor
private:javaHashtable=.
- #javaHashtable ⇒ Object
- #javaHashtable=(javaHashtable) ⇒ Object
- #keys ⇒ Object
- #originalkeysmethod ⇒ Object
- #remove(key) ⇒ Object
- #set(key, value) ⇒ Object
Constructor Details
#initialize(hs = nil) ⇒ Hash
private:javaHashtable=
12 13 14 15 16 17 |
# File 'lib/src-generic/Hash.rb', line 12 def initialize(hs=nil) if (hs.nil?) super() end @javaHashtable = hs end |
Instance Method Details
#exists(key) ⇒ Object
35 36 37 |
# File 'lib/src-generic/Hash.rb', line 35 def exists(key) self.has_key?(key) end |
#get(key) ⇒ Object
19 20 21 |
# File 'lib/src-generic/Hash.rb', line 19 def get(key) return self[key] end |
#getJavaHashtable ⇒ Object
31 32 33 |
# File 'lib/src-generic/Hash.rb', line 31 def getJavaHashtable() return @javaHashtable end |
#javaHashtable ⇒ Object
7 8 9 |
# File 'lib/src-generic/Hash.rb', line 7 def javaHashtable @javaHashtable end |
#javaHashtable=(javaHashtable) ⇒ Object
3 4 5 |
# File 'lib/src-generic/Hash.rb', line 3 def javaHashtable=(javaHashtable) @javaHashtable=javaHashtable end |
#keys ⇒ Object
27 28 29 |
# File 'lib/src-generic/Hash.rb', line 27 def keys() return Iterator.new(self.originalkeysmethod().to_enum) end |
#originalkeysmethod ⇒ Object
25 |
# File 'lib/src-generic/Hash.rb', line 25 alias originalkeysmethod keys |
#remove(key) ⇒ Object
39 40 41 |
# File 'lib/src-generic/Hash.rb', line 39 def remove(key) self.delete(key) end |
#set(key, value) ⇒ Object
22 23 24 |
# File 'lib/src-generic/Hash.rb', line 22 def set(key, value) self[key] = value end |