+
Point of view
All features
class JSON_ARRAY
Summary
Direct parents
Inherit list: JSON_TEXT, TRAVERSABLE
Class invariant
Overview
Creation features
{JSON_HANDLER}
Features
{ANY}
{ANY}
{JSON_HANDLER}
{}
{ANY}
{JSON_HANDLER}
{ANY}
Other features:
{ANY}
Agent-based features:
{ANY}
{ANY}
{}
Agent-based features:
{ANY}
{}
Indexing:
{ANY}
lower: INTEGER_32
effective function
{ANY}
Minimum index.
See also upper, valid_index, item.
upper: INTEGER_32
effective function
{ANY}
Maximum index.
See also lower, valid_index, item.
count: INTEGER_32
effective function
{ANY}
Number of available items in the hoard.
See also is_empty
ensure
  • Result >= 0
is_empty: BOOLEAN
effective function
{ANY}
Is the hoard empty ?
See also count.
ensure
  • definition: Result = count = 0
first: JSON_VALUE
effective function
{ANY}
The very first item.
See also last, item.
require
  • not is_empty
ensure
  • definition: Result = item(lower)
last: JSON_VALUE
effective function
{ANY}
The last item.
See also first, item.
require
  • not is_empty
ensure
  • definition: Result = item(upper)
item (index: INTEGER_32): JSON_VALUE
effective function
{ANY}
Item at the corresponding index i.
See also lower, upper, valid_index.
require
  • valid_index(index)
new_iterator: ITERATOR[JSON_VALUE]
effective function
{ANY}
ensure
  • Result /= Void
  • Result.generation = generation
accept (visitor: VISITOR)
effective procedure
{ANY}
Accept to be visited by the visitor.
require
  • visitor /= Void
is_equal (other: JSON_ARRAY): BOOLEAN
effective function
{ANY}
Is other attached to an object considered equal to current object?
require
      • other /= Void
      • other /= Void
      • other /= Void
      • other /= Void
ensure
  • commutative: generating_type = other.generating_type implies Result = other.is_equal(Current)
out_in_tagged_out_memory
effective procedure
{ANY}
Append terse printable representation of current object in tagged_out_memory.
require
      • locked: tagged_out_locked
      • locked: tagged_out_locked
      • locked: tagged_out_locked
      • locked: tagged_out_locked
ensure
  • still_locked: tagged_out_locked
  • not_cleared: tagged_out_memory.count >= old tagged_out_memory.count
  • append_only: old tagged_out_memory.twin.is_equal(tagged_out_memory.substring(1, old tagged_out_memory.count))
writable attribute
make (a_array: TRAVERSABLE[JSON_VALUE])
effective procedure
{}
require
  • a_array /= Void
ensure
line: INTEGER_32
writable attribute
{ANY}
optional line and column; 0 if not set
column: INTEGER_32
writable attribute
{ANY}
optional line and column; 0 if not set
set_position (a_line: INTEGER_32, a_column: INTEGER_32)
effective procedure
ensure
enumerate: ENUMERATE[E_]
effective function
{ANY}
get_new_iterator: ITERATOR[E_]
frozen
effective function
{ANY}
This feature is obsolete: Use `new_iterator' instead. This historical SmartEiffel feature is badly named.
for_each (action: PROCEDURE[TUPLE[TUPLE 1[E_]]])
effective procedure
{ANY}
Apply action to every item of Current.
See also for_all, exists, aggregate.
require
  • action /= Void
for_all (test: FUNCTION[TUPLE[TUPLE 1[E_]]]): BOOLEAN
effective function
{ANY}
Do all items satisfy test?
See also for_each, exists, aggregate.
require
  • test /= Void
exists (test: FUNCTION[TUPLE[TUPLE 1[E_]]]): BOOLEAN
effective function
{ANY}
Does at least one item satisfy test?
See also for_each, for_all, aggregate.
require
  • test /= Void
aggregate (action: FUNCTION[TUPLE[TUPLE 2[E_, E_], E_]], initial: E_): E_
effective function
{ANY}
Aggregate all the elements starting from the initial value.
See also for_each, for_all, exists.
require
  • action /= Void
generation: INTEGER_32
writable attribute
{ANY}
next_generation
effective procedure
{}
ensure
do_all (action: ROUTINE[TUPLE[TUPLE 1[E_]]])
frozen
effective procedure
{ANY}
Apply action to every item of Current.
This feature is obsolete: Use `for_each` instead. This feature is not secure because it accepts a FUNCTION, the result of which is lost.
_inline_agent1 (a: ROUTINE[TUPLE[TUPLE 1[E_]]], e: E_)
frozen
effective procedure
{}
valid_index (i: INTEGER_32): BOOLEAN
effective function
{ANY}
True when i is valid (i.e., inside actual bounds).
See also lower, upper, item.
ensure