-
Notifications
You must be signed in to change notification settings - Fork 3
kiwi.lang.KObject
KObject is the building block of Kiwi. Every User Defined Type (UDT) must inherit KObject in order to work properly with collections and other Kiwi's features. In the following example we create a Student User Defined Type (UDT) in which we inherit KObject using the extends keyword.
#include once "kiwi\kiwi.bi"
' In this example we will create an ArrayList that holds Students
Type Student extends KObject ' Always inherit from KObject for all UDTs
firstName as String
lastName As String
grade as Double
End Type
KObject exists in kiwi\lang\KObject.bi file
sub KObject.wait()
Causes the current thread to wait until it is awakened, typically by being notified or interrupted.
sub KObject.wait(timeoutMillis as LongInt)
Causes the current thread to wait until it is awakened, typically by being notified or interrupted, or until a certain amount of real time has elapsed.
Parameters:
@param timeoutMillis is the maximum time to wait, in milliseconds
sub KObject.notify()
Wakes up a single thread that is waiting on this object's monitor. If any threads are waiting on this object, one of them is chosen to be awakened. The choice is arbitrary and occurs at the discretion of the implementation. A thread waits on an object's monitor by calling one of the wait methods.
function KObject.toString() as String
Returns a string representation of this KObject.
function KObject.getUniqueID() as UInteger
Returns a unique UInteger ID of this KObject
- MySQL/MariaDB - Coming to v1.0.2
- ArrayList
- Comparator
- HashMap - Coming to v1.0.2
- Queue