Class List Method List File List

# Class: Vertx::LocalMap

Inherits:
  Object
  - Object
  - Vertx::LocalMap
  show all
Defined in:
  /Users/julien/java/vertx-stack/stack-docs/target/rb/vertx/local_map.rb

## Instance Method Summary (collapse)

- - (Object) clear
- - (Object) close
- - (Boolean) empty?
- - (Object) get(key = nil)
- - (LocalMap) initialize(j_del) constructor
  A new instance of LocalMap.
- - (Object) j_del
- - (Object) put(key = nil, value = nil)
- - (Object) put_if_absent(key = nil, value = nil)
- - (Object) remove(key = nil)
- - (Boolean) remove_if_present?(key = nil, value = nil)
- - (Object) replace(key = nil, value = nil)
- - (Boolean) replace_if_present?(key = nil, oldValue = nil, newValue = nil)
- - (Object) size

## Constructor Details

### - (`LocalMap`) initialize(j_del)

Returns a new instance of LocalMap

    14
    15
    16
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx/local_map.rb', line 14

    def initialize(j_del)
      @j_del = j_del
    end

## Instance Method Details

### - (`Object`) clear

Raises:

- (`ArgumentError`)

    52
    53
    54
    55
    56
    57
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx/local_map.rb', line 52

    def clear
      if !block_given?
        return @j_del.java_method(:clear, []).call()
      end
      raise ArgumentError, "Invalid arguments when calling clear()"
    end

### - (`Object`) close

Raises:

- (`ArgumentError`)

    116
    117
    118
    119
    120
    121
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx/local_map.rb', line 116

    def close
      if !block_given?
        return @j_del.java_method(:close, []).call()
      end
      raise ArgumentError, "Invalid arguments when calling close()"
    end

### - (`Boolean`) empty?

Returns:

- (`Boolean`)

Raises:

- (`ArgumentError`)

    67
    68
    69
    70
    71
    72
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx/local_map.rb', line 67

    def empty?
      if !block_given?
        return @j_del.java_method(:isEmpty, []).call()
      end
      raise ArgumentError, "Invalid arguments when calling empty?()"
    end

### - (`Object`) get(key = nil)

Raises:

- (`ArgumentError`)

    25
    26
    27
    28
    29
    30
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx/local_map.rb', line 25

    def get(key=nil)
      if (key.class == String  || key.class == Hash || key.class == Array || key.class == NilClass || key.class == TrueClass || key.class == FalseClass || key.class == Fixnum || key.class == Float) && !block_given?
        return ::Vertx::Util::Utils.from_object(@j_del.java_method(:get, [Java::java.lang.Object.java_class]).call(::Vertx::Util::Utils.to_object(key)))
      end
      raise ArgumentError, "Invalid arguments when calling get(key)"
    end

### - (`Object`) j_del

    19
    20
    21
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx/local_map.rb', line 19

    def j_del
      @j_del
    end

### - (`Object`) put(key = nil, value = nil)

Raises:

- (`ArgumentError`)

    35
    36
    37
    38
    39
    40
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx/local_map.rb', line 35

    def put(key=nil,value=nil)
      if (key.class == String  || key.class == Hash || key.class == Array || key.class == NilClass || key.class == TrueClass || key.class == FalseClass || key.class == Fixnum || key.class == Float) && (value.class == String  || value.class == Hash || value.class == Array || value.class == NilClass || value.class == TrueClass || value.class == FalseClass || value.class == Fixnum || value.class == Float) && !block_given?
        return ::Vertx::Util::Utils.from_object(@j_del.java_method(:put, [Java::java.lang.Object.java_class,Java::java.lang.Object.java_class]).call(::Vertx::Util::Utils.to_object(key),::Vertx::Util::Utils.to_object(value)))
      end
      raise ArgumentError, "Invalid arguments when calling put(key,value)"
    end

### - (`Object`) put_if_absent(key = nil, value = nil)

Raises:

- (`ArgumentError`)

    77
    78
    79
    80
    81
    82
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx/local_map.rb', line 77

    def put_if_absent(key=nil,value=nil)
      if (key.class == String  || key.class == Hash || key.class == Array || key.class == NilClass || key.class == TrueClass || key.class == FalseClass || key.class == Fixnum || key.class == Float) && (value.class == String  || value.class == Hash || value.class == Array || value.class == NilClass || value.class == TrueClass || value.class == FalseClass || value.class == Fixnum || value.class == Float) && !block_given?
        return ::Vertx::Util::Utils.from_object(@j_del.java_method(:putIfAbsent, [Java::java.lang.Object.java_class,Java::java.lang.Object.java_class]).call(::Vertx::Util::Utils.to_object(key),::Vertx::Util::Utils.to_object(value)))
      end
      raise ArgumentError, "Invalid arguments when calling put_if_absent(key,value)"
    end

### - (`Object`) remove(key = nil)

Raises:

- (`ArgumentError`)

    44
    45
    46
    47
    48
    49
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx/local_map.rb', line 44

    def remove(key=nil)
      if (key.class == String  || key.class == Hash || key.class == Array || key.class == NilClass || key.class == TrueClass || key.class == FalseClass || key.class == Fixnum || key.class == Float) && !block_given?
        return ::Vertx::Util::Utils.from_object(@j_del.java_method(:remove, [Java::java.lang.Object.java_class]).call(::Vertx::Util::Utils.to_object(key)))
      end
      raise ArgumentError, "Invalid arguments when calling remove(key)"
    end

### - (`Boolean`) remove_if_present?(key = nil, value = nil)

Returns:

- (`Boolean`)

Raises:

- (`ArgumentError`)

    87
    88
    89
    90
    91
    92
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx/local_map.rb', line 87

    def remove_if_present?(key=nil,value=nil)
      if (key.class == String  || key.class == Hash || key.class == Array || key.class == NilClass || key.class == TrueClass || key.class == FalseClass || key.class == Fixnum || key.class == Float) && (value.class == String  || value.class == Hash || value.class == Array || value.class == NilClass || value.class == TrueClass || value.class == FalseClass || value.class == Fixnum || value.class == Float) && !block_given?
        return @j_del.java_method(:removeIfPresent, [Java::java.lang.Object.java_class,Java::java.lang.Object.java_class]).call(::Vertx::Util::Utils.to_object(key),::Vertx::Util::Utils.to_object(value))
      end
      raise ArgumentError, "Invalid arguments when calling remove_if_present?(key,value)"
    end

### - (`Object`) replace(key = nil, value = nil)

Raises:

- (`ArgumentError`)

    108
    109
    110
    111
    112
    113
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx/local_map.rb', line 108

    def replace(key=nil,value=nil)
      if (key.class == String  || key.class == Hash || key.class == Array || key.class == NilClass || key.class == TrueClass || key.class == FalseClass || key.class == Fixnum || key.class == Float) && (value.class == String  || value.class == Hash || value.class == Array || value.class == NilClass || value.class == TrueClass || value.class == FalseClass || value.class == Fixnum || value.class == Float) && !block_given?
        return ::Vertx::Util::Utils.from_object(@j_del.java_method(:replace, [Java::java.lang.Object.java_class,Java::java.lang.Object.java_class]).call(::Vertx::Util::Utils.to_object(key),::Vertx::Util::Utils.to_object(value)))
      end
      raise ArgumentError, "Invalid arguments when calling replace(key,value)"
    end

### - (`Boolean`) replace_if_present?(key = nil, oldValue = nil, newValue = nil)

Returns:

- (`Boolean`)

Raises:

- (`ArgumentError`)

    98
    99
    100
    101
    102
    103
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx/local_map.rb', line 98

    def replace_if_present?(key=nil,oldValue=nil,newValue=nil)
      if (key.class == String  || key.class == Hash || key.class == Array || key.class == NilClass || key.class == TrueClass || key.class == FalseClass || key.class == Fixnum || key.class == Float) && (oldValue.class == String  || oldValue.class == Hash || oldValue.class == Array || oldValue.class == NilClass || oldValue.class == TrueClass || oldValue.class == FalseClass || oldValue.class == Fixnum || oldValue.class == Float) && (newValue.class == String  || newValue.class == Hash || newValue.class == Array || newValue.class == NilClass || newValue.class == TrueClass || newValue.class == FalseClass || newValue.class == Fixnum || newValue.class == Float) && !block_given?
        return @j_del.java_method(:replaceIfPresent, [Java::java.lang.Object.java_class,Java::java.lang.Object.java_class,Java::java.lang.Object.java_class]).call(::Vertx::Util::Utils.to_object(key),::Vertx::Util::Utils.to_object(oldValue),::Vertx::Util::Utils.to_object(newValue))
      end
      raise ArgumentError, "Invalid arguments when calling replace_if_present?(key,oldValue,newValue)"
    end

### - (`Object`) size

Raises:

- (`ArgumentError`)

    60
    61
    62
    63
    64
    65
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx/local_map.rb', line 60

    def size
      if !block_given?
        return @j_del.java_method(:size, []).call()
      end
      raise ArgumentError, "Invalid arguments when calling size()"
    end