Constructors
TomlArraySource Codeshared TomlArray({TomlValue*} elements = [])

Create a new TomlArray containing the given elements.

Parameters:
  • elements = []
Attributes
arraysSource Codeshared List<TomlArray> arrays

Returns a List<TomlArray> view of this list. An AssertionError will be thrown upon accessing any of this array's elements that are not TomlArrays.

booleansSource Codeshared List<Boolean> booleans

Returns a List<Boolean> view of this list. An AssertionError will be thrown upon accessing any of this array's elements that are not Booleans.

dateTimesSource Codeshared List<DateTime> dateTimes

Returns a List<DateTime> view of this list. An AssertionError will be thrown upon accessing any of this array's elements that are not DateTimes.

datesSource Codeshared List<Date> dates

Returns a List<Date> view of this list. An AssertionError will be thrown upon accessing any of this array's elements that are not Dates.

floatsSource Codeshared List<Float> floats

Returns a List<Float> view of this list. An AssertionError will be thrown upon accessing any of this array's elements that are not Floats.

hashSource Codeshared actual Integer hash

The hash value of the value, which allows the value to be an element of a hash-based set or key of a hash-based map. Implementations must respect the constraint that:

  • if x==y then x.hash==y.hash.

Therefore, a class which refines equals must also refine hash.

In general, hash values vary between platforms and between executions of the same program.

Note that when executing on a Java Virtual Machine, the 64-bit Integer value returned by an implementation of hash is truncated to a 32-bit integer value by taking the exclusive disjunction of the 32 lowest-order bits with the 32 highest-order bits, before returning the value to the caller.

Refines Identifiable.hash ultimately refines Object.hash
integersSource Codeshared List<Integer> integers

Returns a List<Integer> view of this list. An AssertionError will be thrown upon accessing any of this array's elements that are not Integers.

lastIndexSource Codeshared actual Integer? lastIndex

The index of the last element of the list, or null if the list is empty. Always size>0 then size-1.

stringsSource Codeshared List<String> strings

Returns a List<String> view of this list. An AssertionError will be thrown upon accessing any of this array's elements that are not Strings.

tablesSource Codeshared List<TomlArray> tables

Returns a List<TomlTable> view of this list. An AssertionError will be thrown upon accessing any of this array's elements that are not TomlTables.

timesSource Codeshared List<Time> times

Returns a List<Time> view of this list. An AssertionError will be thrown upon accessing any of this array's elements that are not Times.

zoneDateTimesSource Codeshared List<ZoneDateTime> zoneDateTimes

Returns a List<ZoneDateTime> view of this list. An AssertionError will be thrown upon accessing any of this array's elements that are not ZoneDateTimes.

Inherited Attributes
Attributes inherited from: Object
Attributes inherited from: Collection<Element>
Attributes inherited from: Correspondence<Key,Item>
Attributes inherited from: Iterable<Element,Absent>
Attributes inherited from: List<Element>
Methods
addSource Codeshared actual void add(TomlValue element)

Add the given element to the end of this list, incrementing the length of the list.

clearSource Codeshared actual void clear()

Remove every element from this list, leaving an empty list with no elements.

cloneSource Codeshared actual TomlArray clone()

A shallow copy of this collection, that is, a collection with identical elements which does not change if this collection changes. If this collection is immutable, it is acceptable to return a reference to this collection. If this collection is mutable, a newly instantiated collection must be returned.

Refines MutableList.clone ultimately refines Collection.clone
deleteSource Codeshared actual TomlValue? delete(Integer index)

Remove the element at the specified index, returning the removed element, if any, or null if there was no such element.

Refines MutableList.delete ultimately refines ListMutator.delete
equalsSource Codeshared actual Boolean equals(Object other)

Determine if two values are equal.

For any two non-null objects x and y, x.equals(y) may be written as:

x == y 

Implementations should respect the constraints that:

  • if x===y then x==y (reflexivity),
  • if x==y then y==x (symmetry),
  • if x==y and y==z then x==z (transitivity).

Furthermore it is recommended that implementations ensure that if x==y then x and y have the same concrete class.

A class which explicitly refines equals() is said to support value equality, and the equality operator == is considered much more meaningful for such classes than for a class which simply inherits the default implementation of identity equality from Identifiable.

Note that an implementation of equals() that always returns false does satisfy the constraints given above, as long as the class does not inherit Identifiable. Therefore, in very rare cases where there is no reasonable definition of value equality for a class, for example, function references (Callable), it is acceptable for equals() to be defined to return false for every argument.

Refines Identifiable.equals ultimately refines Object.equals
getFromFirstSource Codeshared actual TomlValue? getFromFirst(Integer index)

The indexth element returned by an iterator of this stream, or null if there are fewer than index+1 elements in the stream. For a stream with an unstable iteration order, a different value might be produced each time getFromFirst(index) is called for a given integer index.

Refines List.getFromFirst ultimately refines Iterable.getFromFirst
insertSource Codeshared actual void insert(Integer index, TomlValue element)

Insert the given element at the specified index, incrementing the length of the list.

iteratorSource Codeshared actual Iterator<TomlValue> iterator()

An iterator for the elements belonging to this stream.

If this is a nonempty stream with type {Element+}, the iterator must produce at least one element.

Refines List.iterator ultimately refines Iterable.iterator
setSource Codeshared actual void set(Integer index, TomlValue element)

Set the item associated with the given index to the given item, replacing the item previously associated with this index.

For any instance c of IndexedCorrespondenceMutator, c.set(index, item) may be written using the item and assignment operators:

c[index] = item
Inherited Methods
Methods inherited from: Object
Methods inherited from: Category<Element>
Methods inherited from: Collection<Element>
Methods inherited from: Correspondence<Key,Item>
Methods inherited from: IndexedCorrespondenceMutator<Element>
Methods inherited from: Iterable<Element,Absent>
Methods inherited from: List<Element>
Methods inherited from: ListMutator<Element>
Methods inherited from: MutableList<Element>
Methods inherited from: Ranged<Index,Element,Subrange>