propane 3.11.0-java → 4.0.0-java

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (61) hide show
  1. checksums.yaml +4 -4
  2. data/.mvn/extensions.xml +1 -1
  3. data/CHANGELOG.md +2 -0
  4. data/README.md +5 -5
  5. data/Rakefile +1 -1
  6. data/lib/propane/app.rb +2 -2
  7. data/lib/propane/version.rb +1 -1
  8. data/lib/propane-4.0.0.jar +0 -0
  9. data/library/slider/slider.rb +1 -1
  10. data/pom.rb +8 -8
  11. data/pom.xml +8 -8
  12. data/propane.gemspec +3 -3
  13. data/src/main/java/monkstone/ColorUtil.java +1 -1
  14. data/src/main/java/monkstone/MathToolModule.java +1 -1
  15. data/src/main/java/monkstone/PropaneLibrary.java +1 -1
  16. data/src/main/java/monkstone/fastmath/DegLutTables.java +10 -11
  17. data/src/main/java/monkstone/fastmath/Deglut.java +1 -1
  18. data/src/main/java/monkstone/filechooser/Chooser.java +1 -1
  19. data/src/main/java/monkstone/noise/LICENSE +121 -0
  20. data/src/main/java/monkstone/slider/CustomHorizontalSlider.java +1 -1
  21. data/src/main/java/monkstone/slider/CustomVerticalSlider.java +1 -1
  22. data/src/main/java/monkstone/slider/SimpleHorizontalSlider.java +1 -1
  23. data/src/main/java/monkstone/slider/SimpleVerticalSlider.java +1 -1
  24. data/src/main/java/monkstone/slider/SliderBar.java +1 -1
  25. data/src/main/java/monkstone/slider/SliderGroup.java +1 -1
  26. data/src/main/java/monkstone/slider/WheelHandler.java +1 -1
  27. data/src/main/java/monkstone/vecmath/package-info.java +1 -1
  28. data/src/main/java/monkstone/vecmath/vec2/Vec2.java +92 -68
  29. data/src/main/java/monkstone/vecmath/vec3/Vec3.java +1 -1
  30. data/src/main/java/monkstone/videoevent/CaptureEvent.java +1 -1
  31. data/src/main/java/monkstone/videoevent/MovieEvent.java +1 -1
  32. data/src/main/java/monkstone/videoevent/package-info.java +1 -1
  33. data/src/main/java/processing/awt/PGraphicsJava2D.java +0 -1
  34. data/src/main/java/processing/awt/PImageAWT.java +2 -4
  35. data/src/main/java/processing/core/PApplet.java +4 -4
  36. data/src/main/java/processing/core/PImage.java +3025 -3047
  37. data/src/main/java/processing/core/PMatrix.java +5 -2
  38. data/src/main/java/processing/data/DoubleDict.java +72 -43
  39. data/src/main/java/processing/data/DoubleList.java +6 -2
  40. data/src/main/java/processing/data/FloatDict.java +744 -756
  41. data/src/main/java/processing/data/FloatList.java +68 -26
  42. data/src/main/java/processing/data/IntDict.java +72 -45
  43. data/src/main/java/processing/data/IntList.java +63 -26
  44. data/src/main/java/processing/data/JSONArray.java +892 -931
  45. data/src/main/java/processing/data/JSONObject.java +1169 -1262
  46. data/src/main/java/processing/data/JSONTokener.java +30 -49
  47. data/src/main/java/processing/data/LongDict.java +699 -712
  48. data/src/main/java/processing/data/LongList.java +676 -700
  49. data/src/main/java/processing/data/Sort.java +1 -0
  50. data/src/main/java/processing/data/Table.java +4040 -3661
  51. data/src/main/java/processing/data/TableRow.java +16 -0
  52. data/src/main/java/processing/data/XML.java +1041 -956
  53. data/src/main/java/processing/event/TouchEvent.java +1 -1
  54. data/src/main/java/processing/opengl/FontTexture.java +2 -2
  55. data/src/main/java/processing/opengl/PGraphicsOpenGL.java +15 -18
  56. data/src/main/java/processing/opengl/PJOGL.java +2 -2
  57. data/src/main/java/processing/opengl/PShapeOpenGL.java +23 -24
  58. data/test/vecmath_spec_test.rb +14 -3
  59. data/vendors/Rakefile +1 -1
  60. metadata +9 -8
  61. data/lib/propane-3.11.0.jar +0 -0
@@ -37,6 +37,7 @@ public class IntList implements Iterable<Integer> {
37
37
 
38
38
 
39
39
  /**
40
+ * @param length
40
41
  * @nowebref
41
42
  */
42
43
  public IntList(int length) {
@@ -45,6 +46,7 @@ public class IntList implements Iterable<Integer> {
45
46
 
46
47
 
47
48
  /**
49
+ * @param source
48
50
  * @nowebref
49
51
  */
50
52
  public IntList(int[] source) {
@@ -55,9 +57,9 @@ public class IntList implements Iterable<Integer> {
55
57
 
56
58
 
57
59
  /**
58
- * Construct an IntList from an iterable pile of objects.
59
- * For instance, a float array, an array of strings, who knows).
60
+ * Construct an IntList from an iterable pile of objects.For instance, a float array, an array of strings, who knows).
60
61
  * Un-parseable or null values will be set to 0.
62
+ * @param iter
61
63
  * @nowebref
62
64
  */
63
65
  public IntList(Iterable<Object> iter) {
@@ -65,8 +67,8 @@ public class IntList implements Iterable<Integer> {
65
67
  for (Object o : iter) {
66
68
  if (o == null) {
67
69
  append(0); // missing value default
68
- } else if (o instanceof Number) {
69
- append(((Number) o).intValue());
70
+ } else if (o instanceof Number number) {
71
+ append(number.intValue());
70
72
  } else {
71
73
  append(PApplet.parseInt(o.toString().trim()));
72
74
  }
@@ -76,8 +78,8 @@ public class IntList implements Iterable<Integer> {
76
78
 
77
79
 
78
80
  /**
79
- * Construct an IntList from a random pile of objects.
80
- * Un-parseable or null values will be set to zero.
81
+ * Construct an IntList from a random pile of objects.Un-parseable or null values will be set to zero.
82
+ * @param items
81
83
  */
82
84
  public IntList(Object... items) {
83
85
  final int missingValue = 0; // nuts, can't be last/final/second arg
@@ -88,8 +90,8 @@ public class IntList implements Iterable<Integer> {
88
90
  for (Object o : items) {
89
91
  int value = missingValue;
90
92
  if (o != null) {
91
- if (o instanceof Number) {
92
- value = ((Number) o).intValue();
93
+ if (o instanceof Number number) {
94
+ value = number.intValue();
93
95
  } else {
94
96
  value = PApplet.parseInt(o.toString().trim(), missingValue);
95
97
  }
@@ -130,6 +132,7 @@ public class IntList implements Iterable<Integer> {
130
132
  /**
131
133
  * Get the length of the list.
132
134
  *
135
+ * @return
133
136
  * @webref intlist:method
134
137
  * @brief Get the length of the list
135
138
  */
@@ -165,6 +168,8 @@ public class IntList implements Iterable<Integer> {
165
168
  /**
166
169
  * Get an entry at a particular index.
167
170
  *
171
+ * @param index
172
+ * @return
168
173
  * @webref intlist:method
169
174
  * @brief Get an entry at a particular index
170
175
  */
@@ -177,10 +182,12 @@ public class IntList implements Iterable<Integer> {
177
182
 
178
183
 
179
184
  /**
180
- * Set the entry at a particular index. If the index is past the length of
181
- * the list, it'll expand the list to accommodate, and fill the intermediate
182
- * entries with 0s.
185
+ * Set the entry at a particular index.If the index is past the length of
186
+ the list, it'll expand the list to accommodate, and fill the intermediate
187
+ entries with 0s.
183
188
  *
189
+ * @param index
190
+ * @param what
184
191
  * @webref intlist:method
185
192
  * @brief Set the entry at a particular index
186
193
  */
@@ -196,7 +203,8 @@ public class IntList implements Iterable<Integer> {
196
203
  }
197
204
 
198
205
 
199
- /** Just an alias for append(), but matches pop() */
206
+ /** Just an alias for append(), but matches pop()
207
+ * @param value */
200
208
  public void push(int value) {
201
209
  append(value);
202
210
  }
@@ -215,6 +223,8 @@ public class IntList implements Iterable<Integer> {
215
223
  /**
216
224
  * Remove an element from the specified index
217
225
  *
226
+ * @param index
227
+ * @return
218
228
  * @webref intlist:method
219
229
  * @brief Remove an element from the specified index
220
230
  */
@@ -268,6 +278,7 @@ public class IntList implements Iterable<Integer> {
268
278
  /**
269
279
  * Add a new entry to the list.
270
280
  *
281
+ * @param value
271
282
  * @webref intlist:method
272
283
  * @brief Add a new entry to the list
273
284
  */
@@ -293,7 +304,8 @@ public class IntList implements Iterable<Integer> {
293
304
  }
294
305
 
295
306
 
296
- /** Add this value, but only if it's not already in the list. */
307
+ /** Add this value, but only if it's not already in the list.
308
+ * @param value */
297
309
  public void appendUnique(int value) {
298
310
  if (!hasValue(value)) {
299
311
  append(value);
@@ -413,7 +425,9 @@ public class IntList implements Iterable<Integer> {
413
425
  // }
414
426
 
415
427
 
416
- /** Return the first index of a particular value. */
428
+ /** Return the first index of a particular value.
429
+ * @param what
430
+ * @return */
417
431
  public int index(int what) {
418
432
  /*
419
433
  if (indexCache != null) {
@@ -443,6 +457,8 @@ public class IntList implements Iterable<Integer> {
443
457
  // }
444
458
 
445
459
  /**
460
+ * @param value
461
+ * @return
446
462
  * @webref intlist:method
447
463
  * @brief Check if a number is a part of the list
448
464
  */
@@ -460,6 +476,7 @@ public class IntList implements Iterable<Integer> {
460
476
  }
461
477
 
462
478
  /**
479
+ * @param index
463
480
  * @webref intlist:method
464
481
  * @brief Add one to a value
465
482
  */
@@ -479,6 +496,8 @@ public class IntList implements Iterable<Integer> {
479
496
 
480
497
 
481
498
  /**
499
+ * @param index
500
+ * @param amount
482
501
  * @webref intlist:method
483
502
  * @brief Add to a value
484
503
  */
@@ -491,6 +510,8 @@ public class IntList implements Iterable<Integer> {
491
510
  }
492
511
 
493
512
  /**
513
+ * @param index
514
+ * @param amount
494
515
  * @webref intlist:method
495
516
  * @brief Subtract from a value
496
517
  */
@@ -503,6 +524,8 @@ public class IntList implements Iterable<Integer> {
503
524
  }
504
525
 
505
526
  /**
527
+ * @param index
528
+ * @param amount
506
529
  * @webref intlist:method
507
530
  * @brief Multiply a value
508
531
  */
@@ -515,6 +538,8 @@ public class IntList implements Iterable<Integer> {
515
538
  }
516
539
 
517
540
  /**
541
+ * @param index
542
+ * @param amount
518
543
  * @webref intlist:method
519
544
  * @brief Divide a value
520
545
  */
@@ -538,6 +563,7 @@ public class IntList implements Iterable<Integer> {
538
563
 
539
564
 
540
565
  /**
566
+ * @return
541
567
  * @webref intlist:method
542
568
  * @brief Return the smallest value
543
569
  */
@@ -568,6 +594,7 @@ public class IntList implements Iterable<Integer> {
568
594
 
569
595
 
570
596
  /**
597
+ * @return
571
598
  * @webref intlist:method
572
599
  * @brief Return the largest value
573
600
  */
@@ -712,6 +739,7 @@ public class IntList implements Iterable<Integer> {
712
739
  /**
713
740
  * Randomize the list order using the random() function from the specified
714
741
  * sketch, allowing shuffle() to use its current randomSeed() setting.
742
+ * @param sketch
715
743
  */
716
744
  public void shuffle(PApplet sketch) {
717
745
  int num = count;
@@ -733,9 +761,10 @@ public class IntList implements Iterable<Integer> {
733
761
 
734
762
 
735
763
  /**
736
- * Returns the actual array being used to store the data. For advanced users,
737
- * this is the fastest way to access a large list. Suitable for iterating
738
- * with a for() loop, but modifying the list will have terrible consequences.
764
+ * Returns the actual array being used to store the data.For advanced users,
765
+ this is the fastest way to access a large list. Suitable for iterating
766
+ with a for() loop, but modifying the list will have terrible consequences.
767
+ * @return
739
768
  */
740
769
  public int[] values() {
741
770
  crop();
@@ -749,15 +778,18 @@ public class IntList implements Iterable<Integer> {
749
778
  return new Iterator<Integer>() {
750
779
  int index = -1;
751
780
 
781
+ @Override
752
782
  public void remove() {
753
783
  IntList.this.remove(index);
754
784
  index--;
755
785
  }
756
786
 
787
+ @Override
757
788
  public Integer next() {
758
789
  return data[++index];
759
790
  }
760
791
 
792
+ @Override
761
793
  public boolean hasNext() {
762
794
  return index+1 < count;
763
795
  }
@@ -778,9 +810,10 @@ public class IntList implements Iterable<Integer> {
778
810
 
779
811
 
780
812
  /**
781
- * Copy values into the specified array. If the specified array is null or
782
- * not the same size, a new array will be allocated.
813
+ * Copy values into the specified array.If the specified array is null or
814
+ not the same size, a new array will be allocated.
783
815
  * @param array
816
+ * @return
784
817
  */
785
818
  public int[] array(int[] array) {
786
819
  if (array == null || array.length != count) {
@@ -835,10 +868,11 @@ public class IntList implements Iterable<Integer> {
835
868
 
836
869
 
837
870
  /**
838
- * Returns a normalized version of this array. Called getPercent() for
839
- * consistency with the Dict classes. It's a getter method because it needs
840
- * to returns a new list (because IntList/Dict can't do percentages or
841
- * normalization in place on int values).
871
+ * Returns a normalized version of this array.Called getPercent() for
872
+ consistency with the Dict classes. It's a getter method because it needs
873
+ to returns a new list (because IntList/Dict can't do percentages or
874
+ normalization in place on int values).
875
+ * @return
842
876
  */
843
877
  public FloatList getPercent() {
844
878
  double sum = 0;
@@ -902,16 +936,18 @@ public class IntList implements Iterable<Integer> {
902
936
 
903
937
  /**
904
938
  * Save tab-delimited entries to a file (TSV format, UTF-8 encoding)
939
+ * @param file
905
940
  */
906
941
  public void save(File file) {
907
- PrintWriter writer = PApplet.createWriter(file);
908
- write(writer);
909
- writer.close();
942
+ try (PrintWriter writer = PApplet.createWriter(file)) {
943
+ write(writer);
944
+ }
910
945
  }
911
946
 
912
947
 
913
948
  /**
914
949
  * Write entries to a PrintWriter, one per line
950
+ * @param writer
915
951
  */
916
952
  public void write(PrintWriter writer) {
917
953
  for (int i = 0; i < count; i++) {
@@ -923,6 +959,7 @@ public class IntList implements Iterable<Integer> {
923
959
 
924
960
  /**
925
961
  * Return this dictionary as a String in JSON format.
962
+ * @return
926
963
  */
927
964
  public String toJSON() {
928
965
  return "[ " + join(", ") + " ]";