Contains standard libraries for ZenCode.

List.zs 810B

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. [Native("stdlib::List")]
  2. export class List<T> {
  3. [Native("constructor")]
  4. public this() {}
  5. [Native("add")]
  6. public add(value as T) as void;
  7. [Native("insert")]
  8. public insert(index as usize, value as T) as void;
  9. [Native("remove")]
  10. public remove(value as usize) as T;
  11. [Native("indexOf")]
  12. public indexOf(value as T) as usize;
  13. [Native("lastIndexOf")]
  14. public lastIndexOf(value as T) as usize;
  15. [Native("getAtIndex")]
  16. public [](index as usize) as T;
  17. [Native("setAtIndex")]
  18. public []=(index as usize, value as T) as T;
  19. [Native("contains")]
  20. public in(value as T) as bool;
  21. [Native("toArray")]
  22. public as T[];
  23. [Native("length")]
  24. public get length as usize;
  25. [Native("isEmpty")]
  26. public get isEmpty as bool;
  27. public implements Iterable<T> {
  28. [Native("iterate")]
  29. iterate();
  30. }
  31. }