Next: , Previous: System_null, Up: System


3.2.1.8 System.object

Base class for all objects in the Kite object system.

Supported operators:

<- (map)
Map given method to each element in the object and return a new list containing the return value of each call to said method. Method must take one parameter (the value of the current element). Caution: requires that your object implement the iterator methods.
<| (reduce)
Call given method on each element in the object, given the result of the last call and the current element of the object. Return the result of the last call of the method. Method must take two parameters–the return value of the last method call (null if the first call) and the current element. Caution: requires that your object implement the iterator methods.

Supported methods:

str()
Returns a string representation of the object.
int()
Returns an integer representation of the object.
float()
Returns a floating-point representation of the object.
bool()
Returns a Boolean representation of the object.
list()
Encapsulates the given object inside of a list.
type()
Returns the type of the object, as a string.
lock()
Obtain a lock on the given object, blocking if necessary.
trylock()
Attempt to obtain a lock on the given object. If a lock cannot be obtained, return false immediately. Otherwise, return true.
unlock()
Unlock given object.
reset()
Reset iterator inside object. (iterator method)
cur()
Return current element inside object, or null if no more objects are available. (iterator method)
next()
Move iterator to next element inside object. Return true if successful, or false if at the end. (iterator method)
print()
Print representation of object to standard output.