Module: Java::java::util::Map

Defined in:
core/src/main/ruby/jruby/java/java_ext/java.util.rb

Overview

Ruby extensions for java.util.Map instances. Generally maps behave like Ruby's `Hash` objects.

See Also:

Instance Method Summary (collapse)

Instance Method Details

- (Object) <(other)



363
364
365
# File 'core/src/main/ruby/jruby/java/java_ext/java.util.rb', line 363

def <(other)
  # stub
end

- (Object) <=(other)



367
368
369
# File 'core/src/main/ruby/jruby/java/java_ext/java.util.rb', line 367

def <=(other)
  # stub
end

- (Object) ==(other)



359
360
361
# File 'core/src/main/ruby/jruby/java/java_ext/java.util.rb', line 359

def ==(other)
  # stub
end

- (Object) >(other)



371
372
373
# File 'core/src/main/ruby/jruby/java/java_ext/java.util.rb', line 371

def >(other)
  # stub
end

- (Object) >=(other)



375
376
377
# File 'core/src/main/ruby/jruby/java/java_ext/java.util.rb', line 375

def >=(other)
  # stub
end

- (Object) [](key) Also known as: store



321
322
323
# File 'core/src/main/ruby/jruby/java/java_ext/java.util.rb', line 321

def [](key)
  # stub
end

- (Object) []=(key, value)



325
326
327
# File 'core/src/main/ruby/jruby/java/java_ext/java.util.rb', line 325

def []=(key, value)
  # stub
end

- (Boolean) any?(&block)

Returns:

  • (Boolean)


484
485
486
# File 'core/src/main/ruby/jruby/java/java_ext/java.util.rb', line 484

def any?(&block)
  # stub
end

- (Object) assoc(obj)



476
477
478
# File 'core/src/main/ruby/jruby/java/java_ext/java.util.rb', line 476

def assoc(obj)
  # stub
end

- (Object) clear Also known as: ruby_clear



436
437
438
# File 'core/src/main/ruby/jruby/java/java_ext/java.util.rb', line 436

def clear
  # stub
end

- (Object) default(arg = nil)



283
284
285
# File 'core/src/main/ruby/jruby/java/java_ext/java.util.rb', line 283

def default(arg = nil)
  # stub
end

- (Object) default=(value)



287
288
289
# File 'core/src/main/ruby/jruby/java/java_ext/java.util.rb', line 287

def default=(value)
  # stub
end

- (Object) default_proc



291
292
293
# File 'core/src/main/ruby/jruby/java/java_ext/java.util.rb', line 291

def default_proc()
  # stub
end

- (Object) default_proc=(proc)



295
296
297
# File 'core/src/main/ruby/jruby/java/java_ext/java.util.rb', line 295

def default_proc=(proc)
  # stub
end

- (Object) delete(key, &block)



395
396
397
# File 'core/src/main/ruby/jruby/java/java_ext/java.util.rb', line 395

def delete(key, &block)
  # stub
end

- (Object) delete_if(&block)



399
400
401
# File 'core/src/main/ruby/jruby/java/java_ext/java.util.rb', line 399

def delete_if(&block)
  # stub
end

- (Object) dig(*args)



488
489
490
# File 'core/src/main/ruby/jruby/java/java_ext/java.util.rb', line 488

def dig(*args)
  # stub
end

- (Object) each(&block) Also known as: each_pair



346
347
348
# File 'core/src/main/ruby/jruby/java/java_ext/java.util.rb', line 346

def each(&block)
  # stub
end

- (Object) each_key(&block)



351
352
353
# File 'core/src/main/ruby/jruby/java/java_ext/java.util.rb', line 351

def each_key(&block)
  # stub
end

- (Object) each_value(&block)



355
356
357
# File 'core/src/main/ruby/jruby/java/java_ext/java.util.rb', line 355

def each_value(&block)
  # stub
end

- (Boolean) empty?

Returns:

  • (Boolean)


301
302
303
# File 'core/src/main/ruby/jruby/java/java_ext/java.util.rb', line 301

def empty?
  # stub
end

- (Object) fetch(key, default = nil, &block)



330
331
332
# File 'core/src/main/ruby/jruby/java/java_ext/java.util.rb', line 330

def fetch(key, default = nil, &block)
  # stub
end

- (Object) fetch_values(*args)



432
433
434
# File 'core/src/main/ruby/jruby/java/java_ext/java.util.rb', line 432

def fetch_values(*args)
  # stub
end

- (Object) flatten(level = nil)



472
473
474
# File 'core/src/main/ruby/jruby/java/java_ext/java.util.rb', line 472

def flatten(level = nil)
  # stub
end

- (Object) invert



411
412
413
# File 'core/src/main/ruby/jruby/java/java_ext/java.util.rb', line 411

def invert
  # stub
end

- (Object) keep_if(&block)



387
388
389
# File 'core/src/main/ruby/jruby/java/java_ext/java.util.rb', line 387

def keep_if(&block)
  # stub
end

- (Object) key(value)



415
416
417
# File 'core/src/main/ruby/jruby/java/java_ext/java.util.rb', line 415

def key(value)
  # stub
end

- (Boolean) key?(key) Also known as: has_key?, include?, member?

Returns:

  • (Boolean)


334
335
336
# File 'core/src/main/ruby/jruby/java/java_ext/java.util.rb', line 334

def key?(key)
  # stub
end

- (Object) keys



419
420
421
# File 'core/src/main/ruby/jruby/java/java_ext/java.util.rb', line 419

def keys
  # stub
end

- (Java::java::util::Map) merge(other, &block) Also known as: ruby_merge

Note:

Since Java 8 this method collides with the built-in *java.util.Map#merge* in which case you want to alias its ruby_ name for map types where you want to have the Ruby version available e.g. `java.util.HashMap.class_eval { alias merge ruby_merge }`

`Hash#merge`

Examples:

map = java.util.HashMap.new({ 1 => '1', 2 => '2' })
map.merge 1 => 'one' # { 1 => "one", 2 => "2" } (java.util.HashMap)

Returns:



449
450
451
# File 'core/src/main/ruby/jruby/java/java_ext/java.util.rb', line 449

def merge(other, &block)
  # stub
end

- (Object) merge!(other, &block)



454
455
456
# File 'core/src/main/ruby/jruby/java/java_ext/java.util.rb', line 454

def merge!(other, &block)
  # stub
end

- (Object) rassoc(obj)



480
481
482
# File 'core/src/main/ruby/jruby/java/java_ext/java.util.rb', line 480

def rassoc(obj)
  # stub
end

- (Object) reject(&block)



403
404
405
# File 'core/src/main/ruby/jruby/java/java_ext/java.util.rb', line 403

def reject(&block)
  # stub
end

- (Object) reject!(&block)



407
408
409
# File 'core/src/main/ruby/jruby/java/java_ext/java.util.rb', line 407

def reject!(&block)
  # stub
end

- (Java::java::util::Map) replace(other) Also known as: ruby_replace

Note:

Since Java 8 this method collides with the built-in *java.util.Map#replace* in which case you want to alias its ruby_ name for map types where you want to have the Ruby version available e.g. `java.util.Hashtable.class_eval { alias replace ruby_replace }`

`Hash#replace`

Examples:

map1 = java.util.Hashtable.new({ 1 => '1', 2 => '2' })
map2 = java.util.LinkedHashMap.new; map2[1] = 'one'
map1.replace map2 # { 1 => "one" } (java.util.Hashtable)

Returns:



467
468
469
# File 'core/src/main/ruby/jruby/java/java_ext/java.util.rb', line 467

def replace(other)
  # stub
end

- (Object) select(&block)



379
380
381
# File 'core/src/main/ruby/jruby/java/java_ext/java.util.rb', line 379

def select(&block)
  # stub
end

- (Object) select!(&block)



383
384
385
# File 'core/src/main/ruby/jruby/java/java_ext/java.util.rb', line 383

def select!(&block)
  # stub
end

- (Object) sort(&block)



391
392
393
# File 'core/src/main/ruby/jruby/java/java_ext/java.util.rb', line 391

def sort(&block)
  # stub
end

- (Array) to_a

Returns:

  • (Array)


306
307
308
# File 'core/src/main/ruby/jruby/java/java_ext/java.util.rb', line 306

def to_a
  # stub
end

- (Hash) to_h Also known as: to_hash

Returns:

  • (Hash)


316
317
318
# File 'core/src/main/ruby/jruby/java/java_ext/java.util.rb', line 316

def to_h
  # stub
end

- (Proc) to_proc

Returns:

  • (Proc)


311
312
313
# File 'core/src/main/ruby/jruby/java/java_ext/java.util.rb', line 311

def to_proc
  # stub
end

- (Boolean) value?(value) Also known as: has_value?

Returns:

  • (Boolean)


341
342
343
# File 'core/src/main/ruby/jruby/java/java_ext/java.util.rb', line 341

def value?(value)
  # stub
end

- (Object) values Also known as: ruby_values



423
424
425
# File 'core/src/main/ruby/jruby/java/java_ext/java.util.rb', line 423

def values
  # stub
end

- (Object) values_at(*args)



428
429
430
# File 'core/src/main/ruby/jruby/java/java_ext/java.util.rb', line 428

def values_at(*args)
  # stub
end