Class: Vertx::JsonPointerIterator
- Inherits:
-
Object
- Object
- Vertx::JsonPointerIterator
- Defined in:
- /Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx/json_pointer_iterator.rb
Overview
The JsonPointerIterator is used by the read/write algorithms of the JsonPointer to read/write the querying data structure
Every method takes the currentValue as parameter, representing the actual value held by the query algorithm.
Implementations of this interface should be stateless, so they can be reused
You can implement this interface to query the structure you want using json pointers
Every method takes the currentValue as parameter, representing the actual value held by the query algorithm.
Implementations of this interface should be stateless, so they can be reused
You can implement this interface to query the structure you want using json pointers
Constant Summary
- @@j_api_type =
Object.new
Class Method Summary (collapse)
- + (Boolean) accept?(obj)
- + (Object) j_api_type
- + (Object) j_class
-
+ (Object) JSON_ITERATOR
Instance of a JsonPointerIterator to query Vert.x Json structures.
- + (Object) unwrap(obj)
- + (Object) wrap(obj)
Instance Method Summary (collapse)
-
- (true, false) appendArrayElement(currentValue, value)
Append array element.
-
- (true, false) isArray(currentValue)
true if the current value is a queryable array.
-
- (Object) getArrayElement(currentValue, i)
Move the iterator the the array element at specified index.
-
- (Object) getObjectParameter(currentValue, key, createOnMissing)
Returns the object parameter with specified key.
-
- (true, false) isNull(currentValue)
true if the current value is null/empty.
-
- (true, false) isObject(currentValue)
true if the current value is a queryable object.
-
- (true, false) objectContainsKey(currentValue, key)
true if current value is a queryable object that contains the specified key.
-
- (true, false) writeArrayElement(currentValue, i, value)
Write array element at specified index.
-
- (true, false) writeObjectParameter(currentValue, key, value)
Write object parameter at specified key.
Class Method Details
+ (Boolean) accept?(obj)
24 25 26 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx/json_pointer_iterator.rb', line 24 def @@j_api_type.accept?(obj) obj.class == JsonPointerIterator end |
+ (Object) j_api_type
33 34 35 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx/json_pointer_iterator.rb', line 33 def self.j_api_type @@j_api_type end |
+ (Object) j_class
36 37 38 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx/json_pointer_iterator.rb', line 36 def self.j_class Java::IoVertxCoreJsonPointer::JsonPointerIterator.java_class end |
+ (Object) JSON_ITERATOR
Instance of a JsonPointerIterator to query Vert.x Json structures
171 172 173 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx/json_pointer_iterator.rb', line 171 def self.JSON_ITERATOR ::Vertx::Util::Utils.safe_create(Java::IoVertxCoreJsonPointer::JsonPointerIterator.JSON_ITERATOR,::Vertx::JsonPointerIterator) end |
+ (Object) unwrap(obj)
30 31 32 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx/json_pointer_iterator.rb', line 30 def @@j_api_type.unwrap(obj) obj.j_del end |
+ (Object) wrap(obj)
27 28 29 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx/json_pointer_iterator.rb', line 27 def @@j_api_type.wrap(obj) JsonPointerIterator.new(obj) end |
Instance Method Details
- (true, false) appendArrayElement(currentValue, value)
Append array element
145 146 147 148 149 150 151 152 153 154 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx/json_pointer_iterator.rb', line 145 def append_array_element?(*args) if ::Vertx::Util::unknown_type.accept?(args[0]) && ::Vertx::Util::unknown_type.accept?(args[1]) && !block_given? return @j_del.java_method(:appendArrayElement, [Java::java.lang.Object.java_class,Java::java.lang.Object.java_class]).call(::Vertx::Util::Utils.to_object(args[0]),::Vertx::Util::Utils.to_object(args[1])) end if defined?(super) super else raise ArgumentError, "Invalid arguments when calling append_array_element?(#{args[0]},#{args[1]})" end end |
- (true, false) isArray(currentValue)
Returns
true
if the current value is a queryable array
114 115 116 117 118 119 120 121 122 123 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx/json_pointer_iterator.rb', line 114 def array?(*args) if ::Vertx::Util::unknown_type.accept?(args[0]) && !block_given? return @j_del.java_method(:isArray, [Java::java.lang.Object.java_class]).call(::Vertx::Util::Utils.to_object(args[0])) end if defined?(super) super else raise ArgumentError, "Invalid arguments when calling array?(#{args[0]})" end end |
- (Object) getArrayElement(currentValue, i)
Move the iterator the the array element at specified index
160 161 162 163 164 165 166 167 168 169 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx/json_pointer_iterator.rb', line 160 def get_array_element(*args) if ::Vertx::Util::unknown_type.accept?(args[0]) && args[1].class == Fixnum && !block_given? return ::Vertx::Util::Utils.from_object(@j_del.java_method(:getArrayElement, [Java::java.lang.Object.java_class,Java::int.java_class]).call(::Vertx::Util::Utils.to_object(args[0]),args[1])) end if defined?(super) super else raise ArgumentError, "Invalid arguments when calling get_array_element(#{args[0]},#{args[1]})" end end |
- (Object) getObjectParameter(currentValue, key, createOnMissing)
Returns the object parameter with specified key.
85 86 87 88 89 90 91 92 93 94 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx/json_pointer_iterator.rb', line 85 def get_object_parameter(*args) if ::Vertx::Util::unknown_type.accept?(args[0]) && args[1].class == String && (args[2].class == TrueClass || args[2].class == FalseClass) && !block_given? return ::Vertx::Util::Utils.from_object(@j_del.java_method(:getObjectParameter, [Java::java.lang.Object.java_class,Java::java.lang.String.java_class,Java::boolean.java_class]).call(::Vertx::Util::Utils.to_object(args[0]),args[1],args[2])) end if defined?(super) super else raise ArgumentError, "Invalid arguments when calling get_object_parameter(#{args[0]},#{args[1]},#{args[2]})" end end |
- (true, false) isNull(currentValue)
Returns
true
if the current value is null/empty
69 70 71 72 73 74 75 76 77 78 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx/json_pointer_iterator.rb', line 69 def null?(*args) if ::Vertx::Util::unknown_type.accept?(args[0]) && !block_given? return @j_del.java_method(:isNull, [Java::java.lang.Object.java_class]).call(::Vertx::Util::Utils.to_object(args[0])) end if defined?(super) super else raise ArgumentError, "Invalid arguments when calling null?(#{args[0]})" end end |
- (true, false) isObject(currentValue)
Returns
true
if the current value is a queryable object
56 57 58 59 60 61 62 63 64 65 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx/json_pointer_iterator.rb', line 56 def object?(*args) if ::Vertx::Util::unknown_type.accept?(args[0]) && !block_given? return @j_del.java_method(:isObject, [Java::java.lang.Object.java_class]).call(::Vertx::Util::Utils.to_object(args[0])) end if defined?(super) super else raise ArgumentError, "Invalid arguments when calling object?(#{args[0]})" end end |
- (true, false) objectContainsKey(currentValue, key)
Returns
true
if current value is a queryable object that contains the specified key
43 44 45 46 47 48 49 50 51 52 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx/json_pointer_iterator.rb', line 43 def object_contains_key?(*args) if ::Vertx::Util::unknown_type.accept?(args[0]) && args[1].class == String && !block_given? return @j_del.java_method(:objectContainsKey, [Java::java.lang.Object.java_class,Java::java.lang.String.java_class]).call(::Vertx::Util::Utils.to_object(args[0]),args[1]) end if defined?(super) super else raise ArgumentError, "Invalid arguments when calling object_contains_key?(#{args[0]},#{args[1]})" end end |
- (true, false) writeArrayElement(currentValue, i, value)
Write array element at specified index
130 131 132 133 134 135 136 137 138 139 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx/json_pointer_iterator.rb', line 130 def write_array_element?(*args) if ::Vertx::Util::unknown_type.accept?(args[0]) && args[1].class == Fixnum && ::Vertx::Util::unknown_type.accept?(args[2]) && !block_given? return @j_del.java_method(:writeArrayElement, [Java::java.lang.Object.java_class,Java::int.java_class,Java::java.lang.Object.java_class]).call(::Vertx::Util::Utils.to_object(args[0]),args[1],::Vertx::Util::Utils.to_object(args[2])) end if defined?(super) super else raise ArgumentError, "Invalid arguments when calling write_array_element?(#{args[0]},#{args[1]},#{args[2]})" end end |
- (true, false) writeObjectParameter(currentValue, key, value)
Write object parameter at specified key
101 102 103 104 105 106 107 108 109 110 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx/json_pointer_iterator.rb', line 101 def write_object_parameter?(*args) if ::Vertx::Util::unknown_type.accept?(args[0]) && args[1].class == String && ::Vertx::Util::unknown_type.accept?(args[2]) && !block_given? return @j_del.java_method(:writeObjectParameter, [Java::java.lang.Object.java_class,Java::java.lang.String.java_class,Java::java.lang.Object.java_class]).call(::Vertx::Util::Utils.to_object(args[0]),args[1],::Vertx::Util::Utils.to_object(args[2])) end if defined?(super) super else raise ArgumentError, "Invalid arguments when calling write_object_parameter?(#{args[0]},#{args[1]},#{args[2]})" end end |