Class: Java::Kyotocabinet::Cursor
Constant Summary
KyotoCabinet::Adaptation::BYTE_ARRAY
Instance Method Summary
collapse
#conv_string_array, included, #ret_bytes, #to_string_array
Instance Method Details
#_accept ⇒ Object
173
|
# File 'lib/kyotocabinet.rb', line 173
alias_method :_accept, :accept
|
#_get ⇒ Object
188
|
# File 'lib/kyotocabinet.rb', line 188
alias_method :_get, :get
|
#_get_key ⇒ Object
199
|
# File 'lib/kyotocabinet.rb', line 199
alias_method :_get_key, :get_key
|
#_get_value ⇒ Object
204
|
# File 'lib/kyotocabinet.rb', line 204
alias_method :_get_value, :get_value
|
#_jump ⇒ Object
210
|
# File 'lib/kyotocabinet.rb', line 210
alias_method :_jump, :jump
|
#_jump_back ⇒ Object
219
|
# File 'lib/kyotocabinet.rb', line 219
alias_method :_jump_back, :jump_back
|
#_seize ⇒ Object
228
|
# File 'lib/kyotocabinet.rb', line 228
alias_method :_seize, :seize
|
#_set_value ⇒ Object
234
|
# File 'lib/kyotocabinet.rb', line 234
alias_method :_set_value, :set_value
|
#accept(visitor = nil, writable = true, step = false) ⇒ Object
174
175
176
177
178
179
180
181
182
183
184
185
|
# File 'lib/kyotocabinet.rb', line 174
def accept(visitor=nil, writable=true, step=false)
vp = if visitor
VisitorProxy.new(visitor, !writable)
else
if writable
BlockVisitor.wrap(blk)
else
BlockVisitor.wrap_nop(blk)
end
end
_accept(vp, writable, step)
end
|
#get(step = false) ⇒ Object
189
190
191
192
193
194
195
196
197
|
# File 'lib/kyotocabinet.rb', line 189
def get(step=false)
r = self._get(step)
if r
return [String.from_java_bytes(r[0]),
String.from_java_bytes(r[1])]
else
return nil
end
end
|
#get_key(step = false) ⇒ Object
200
201
202
|
# File 'lib/kyotocabinet.rb', line 200
def get_key(step=false)
ret_bytes(_get_key(step))
end
|
#get_value(step = false) ⇒ Object
205
206
207
|
# File 'lib/kyotocabinet.rb', line 205
def get_value(step=false)
ret_bytes(_get_value(step))
end
|
#jump(key = nil) ⇒ Object
211
212
213
214
215
216
217
|
# File 'lib/kyotocabinet.rb', line 211
def jump(key=nil)
if key
_jump(key.to_java_bytes)
else
_jump()
end
end
|
#jump_back(key = nil) ⇒ Object
220
221
222
223
224
225
226
|
# File 'lib/kyotocabinet.rb', line 220
def jump_back(key=nil)
if key
_jump_back(key.to_java_bytes)
else
_jump_back()
end
end
|
#seize ⇒ Object
229
230
231
|
# File 'lib/kyotocabinet.rb', line 229
def seize()
to_string_array(_seize())
end
|
#set_value(value, step = false) ⇒ Object
235
236
237
238
|
# File 'lib/kyotocabinet.rb', line 235
def set_value(value, step=false)
_set_value(value ? value.to_java_bytes : nil,
step)
end
|