AVLMapSubKeySet.js 5.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170
  1. "use strict";
  2. Object.defineProperty(exports, "__esModule", { value: true });
  3. exports.cast_de_nrw_schule_svws_core_adt_map_AVLMapSubKeySet = exports.AVLMapSubKeySet = void 0;
  4. const JavaObject_1 = require("../../../java/lang/JavaObject");
  5. class AVLMapSubKeySet extends JavaObject_1.JavaObject {
  6. _sub;
  7. /**
  8. * Erstellt eine neues Sub-Set auf die übergebene {@link AVLMap}.
  9. *
  10. * @param sub Die {@link AVLMap} auf der operiert wird.
  11. */
  12. constructor(sub) {
  13. super();
  14. this._sub = sub;
  15. }
  16. toString() {
  17. return this._sub.toString();
  18. }
  19. comparator() {
  20. return this._sub.comparator();
  21. }
  22. first() {
  23. return this._sub.firstKey();
  24. }
  25. last() {
  26. return this._sub.lastKey();
  27. }
  28. size() {
  29. return this._sub.size();
  30. }
  31. isEmpty() {
  32. return this._sub.isEmpty();
  33. }
  34. contains(o) {
  35. return this._sub.containsKey(o);
  36. }
  37. /**
  38. * Implementation for method overloads of 'toArray'
  39. */
  40. toArray(__param0) {
  41. if ((typeof __param0 === "undefined")) {
  42. return this._sub.bcGetArrayListOfKeys().toArray();
  43. }
  44. else if (((typeof __param0 !== "undefined") && Array.isArray(__param0))) {
  45. let a = __param0;
  46. return this._sub.bcGetArrayListOfKeys().toArray(a);
  47. }
  48. else
  49. throw new Error('invalid method overload');
  50. }
  51. add(e) {
  52. return this._sub.bcAddKey(e);
  53. }
  54. remove(o) {
  55. return this._sub.bcRemoveKeyReturnBool(o);
  56. }
  57. containsAll(c) {
  58. return this._sub.bcContainsAllKeys(c);
  59. }
  60. addAll(c) {
  61. return this._sub.bcAddAllKeys(c);
  62. }
  63. retainAll(c) {
  64. return this._sub.bcRetainAllKeys(c);
  65. }
  66. removeAll(c) {
  67. return this._sub.bcRemoveAllKeys(c);
  68. }
  69. clear() {
  70. this._sub.clear();
  71. }
  72. lower(e) {
  73. return this._sub.bcGetLowerKeyOrNull(e);
  74. }
  75. floor(e) {
  76. return this._sub.bcGetFloorKeyOrNull(e);
  77. }
  78. ceiling(e) {
  79. return this._sub.bcGetCeilingKeyOrNull(e);
  80. }
  81. higher(e) {
  82. return this._sub.bcGetHigherKeyOrNull(e);
  83. }
  84. pollFirst() {
  85. return this._sub.bcPollFirstKeyOrNull();
  86. }
  87. pollLast() {
  88. return this._sub.bcPollLastKeyOrNull();
  89. }
  90. iterator() {
  91. return this._sub.bcGetSubKeySetIterator();
  92. }
  93. descendingSet() {
  94. return this._sub.bcGetSubKeySetDescending();
  95. }
  96. descendingIterator() {
  97. return this._sub.bcGetSubKeySetDescendingIterator();
  98. }
  99. /**
  100. * Implementation for method overloads of 'subSet'
  101. */
  102. subSet(__param0, __param1, __param2, __param3) {
  103. if (((typeof __param0 !== "undefined") && (typeof __param0 !== "undefined")) && ((typeof __param1 !== "undefined") && typeof __param1 === "boolean") && ((typeof __param2 !== "undefined") && (typeof __param2 !== "undefined")) && ((typeof __param3 !== "undefined") && typeof __param3 === "boolean")) {
  104. let fromElement = __param0;
  105. let fromInclusive = __param1;
  106. let toElement = __param2;
  107. let toInclusive = __param3;
  108. return this._sub.bcGetSubKeySet(fromElement, fromInclusive, toElement, toInclusive);
  109. }
  110. else if (((typeof __param0 !== "undefined") && (typeof __param0 !== "undefined")) && ((typeof __param1 !== "undefined") && (typeof __param1 !== "undefined")) && (typeof __param2 === "undefined") && (typeof __param3 === "undefined")) {
  111. let fromElement = __param0;
  112. let toElement = __param1;
  113. return this._sub.bcGetSubKeySet(fromElement, toElement);
  114. }
  115. else
  116. throw new Error('invalid method overload');
  117. }
  118. /**
  119. * Implementation for method overloads of 'headSet'
  120. */
  121. headSet(__param0, __param1) {
  122. if (((typeof __param0 !== "undefined") && (typeof __param0 !== "undefined")) && ((typeof __param1 !== "undefined") && typeof __param1 === "boolean")) {
  123. let toElement = __param0;
  124. let inclusive = __param1;
  125. return this._sub.bcGetSubKeyHeadSet(toElement, inclusive);
  126. }
  127. else if (((typeof __param0 !== "undefined") && (typeof __param0 !== "undefined")) && (typeof __param1 === "undefined")) {
  128. let toElement = __param0;
  129. return this._sub.bcGetSubKeyHeadSet(toElement);
  130. }
  131. else
  132. throw new Error('invalid method overload');
  133. }
  134. /**
  135. * Implementation for method overloads of 'tailSet'
  136. */
  137. tailSet(__param0, __param1) {
  138. if (((typeof __param0 !== "undefined") && (typeof __param0 !== "undefined")) && ((typeof __param1 !== "undefined") && typeof __param1 === "boolean")) {
  139. let fromElement = __param0;
  140. let inclusive = __param1;
  141. return this._sub.bcGetSubKeyTailSet(fromElement, inclusive);
  142. }
  143. else if (((typeof __param0 !== "undefined") && (typeof __param0 !== "undefined")) && (typeof __param1 === "undefined")) {
  144. let fromElement = __param0;
  145. return this._sub.bcGetSubKeyTailSet(fromElement);
  146. }
  147. else
  148. throw new Error('invalid method overload');
  149. }
  150. isTranspiledInstanceOf(name) {
  151. return ['java.util.SortedSet', 'java.util.Collection', 'de.nrw.schule.svws.core.adt.map.AVLMapSubKeySet', 'java.util.Set', 'java.util.NavigableSet', 'java.lang.Iterable'].includes(name);
  152. }
  153. [Symbol.iterator]() {
  154. let iter = this.iterator();
  155. const result = {
  156. next() {
  157. if (iter.hasNext())
  158. return { value: iter.next(), done: false };
  159. return { value: null, done: true };
  160. }
  161. };
  162. return result;
  163. }
  164. }
  165. exports.AVLMapSubKeySet = AVLMapSubKeySet;
  166. function cast_de_nrw_schule_svws_core_adt_map_AVLMapSubKeySet(obj) {
  167. return obj;
  168. }
  169. exports.cast_de_nrw_schule_svws_core_adt_map_AVLMapSubKeySet = cast_de_nrw_schule_svws_core_adt_map_AVLMapSubKeySet;
  170. //# sourceMappingURL=AVLMapSubKeySet.js.map