mirror of
https://github.com/processing/processing4.git
synced 2026-06-16 04:26:26 +02:00
Changed comments for all the web references in core
This commit is contained in:
@@ -12,6 +12,7 @@ import processing.core.PApplet;
|
||||
* A simple table class to use a String as a lookup for an float value.
|
||||
*
|
||||
* @webref data:composite
|
||||
* @webBrief A simple table class to use a String as a lookup for an float value.
|
||||
* @see IntDict
|
||||
* @see StringDict
|
||||
*/
|
||||
@@ -108,8 +109,10 @@ public class FloatDict {
|
||||
|
||||
|
||||
/**
|
||||
* Returns the number of key/value pairs
|
||||
*
|
||||
* @webref floatdict:method
|
||||
* @brief Returns the number of key/value pairs
|
||||
* @webBrief Returns the number of key/value pairs
|
||||
*/
|
||||
public int size() {
|
||||
return count;
|
||||
@@ -145,7 +148,7 @@ public class FloatDict {
|
||||
* Remove all entries.
|
||||
*
|
||||
* @webref floatdict:method
|
||||
* @brief Remove all entries
|
||||
* @webBrief Remove all entries
|
||||
*/
|
||||
public void clear() {
|
||||
count = 0;
|
||||
@@ -259,7 +262,7 @@ public class FloatDict {
|
||||
* Return a copy of the internal keys array. This array can be modified.
|
||||
*
|
||||
* @webref floatdict:method
|
||||
* @brief Return a copy of the internal keys array
|
||||
* @webBrief Return a copy of the internal keys array
|
||||
*/
|
||||
public String[] keyArray() {
|
||||
crop();
|
||||
@@ -281,9 +284,11 @@ public class FloatDict {
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
/**
|
||||
* Return the internal array being used to store the values
|
||||
*
|
||||
* @webref floatdict:method
|
||||
* @brief Return the internal array being used to store the values
|
||||
* @webBrief Return the internal array being used to store the values
|
||||
*/
|
||||
public Iterable<Float> values() {
|
||||
return new Iterable<Float>() {
|
||||
@@ -320,7 +325,7 @@ public class FloatDict {
|
||||
* Create a new array and copy each of the values into it.
|
||||
*
|
||||
* @webref floatdict:method
|
||||
* @brief Create a new array and copy each of the values into it
|
||||
* @webBrief Create a new array and copy each of the values into it
|
||||
*/
|
||||
public float[] valueArray() {
|
||||
crop();
|
||||
@@ -346,7 +351,7 @@ public class FloatDict {
|
||||
* Return a value for the specified key.
|
||||
*
|
||||
* @webref floatdict:method
|
||||
* @brief Return a value for the specified key
|
||||
* @webBrief Return a value for the specified key
|
||||
*/
|
||||
public float get(String key) {
|
||||
int index = index(key);
|
||||
@@ -367,8 +372,10 @@ public class FloatDict {
|
||||
|
||||
|
||||
/**
|
||||
* Create a new key/value pair or change the value of one
|
||||
*
|
||||
* @webref floatdict:method
|
||||
* @brief Create a new key/value pair or change the value of one
|
||||
* @webBrief Create a new key/value pair or change the value of one
|
||||
*/
|
||||
public void set(String key, float amount) {
|
||||
int index = index(key);
|
||||
@@ -390,8 +397,10 @@ public class FloatDict {
|
||||
|
||||
|
||||
/**
|
||||
* Check if a key is a part of the data structure
|
||||
*
|
||||
* @webref floatdict:method
|
||||
* @brief Check if a key is a part of the data structure
|
||||
* @webBrief Check if a key is a part of the data structure
|
||||
*/
|
||||
public boolean hasKey(String key) {
|
||||
return index(key) != -1;
|
||||
@@ -399,8 +408,10 @@ public class FloatDict {
|
||||
|
||||
|
||||
/**
|
||||
* Add to a value
|
||||
*
|
||||
* @webref floatdict:method
|
||||
* @brief Add to a value
|
||||
* @webBrief Add to a value
|
||||
*/
|
||||
public void add(String key, float amount) {
|
||||
int index = index(key);
|
||||
@@ -413,8 +424,10 @@ public class FloatDict {
|
||||
|
||||
|
||||
/**
|
||||
* Subtract from a value
|
||||
*
|
||||
* @webref floatdict:method
|
||||
* @brief Subtract from a value
|
||||
* @webBrief Subtract from a value
|
||||
*/
|
||||
public void sub(String key, float amount) {
|
||||
add(key, -amount);
|
||||
@@ -422,8 +435,10 @@ public class FloatDict {
|
||||
|
||||
|
||||
/**
|
||||
* Multiply a value
|
||||
*
|
||||
* @webref floatdict:method
|
||||
* @brief Multiply a value
|
||||
* @webBrief Multiply a value
|
||||
*/
|
||||
public void mult(String key, float amount) {
|
||||
int index = index(key);
|
||||
@@ -434,8 +449,10 @@ public class FloatDict {
|
||||
|
||||
|
||||
/**
|
||||
* Divide a value
|
||||
*
|
||||
* @webref floatdict:method
|
||||
* @brief Divide a value
|
||||
* @webBrief Divide a value
|
||||
*/
|
||||
public void div(String key, float amount) {
|
||||
int index = index(key);
|
||||
@@ -456,8 +473,10 @@ public class FloatDict {
|
||||
|
||||
|
||||
/**
|
||||
* Return the smallest value
|
||||
*
|
||||
* @webref floatlist:method
|
||||
* @brief Return the smallest value
|
||||
* @webBrief Return the smallest value
|
||||
*/
|
||||
public int minIndex() {
|
||||
//checkMinMax("minIndex");
|
||||
@@ -510,8 +529,10 @@ public class FloatDict {
|
||||
|
||||
|
||||
/**
|
||||
* Return the largest value
|
||||
*
|
||||
* @webref floatlist:method
|
||||
* @brief Return the largest value
|
||||
* @webBrief Return the largest value
|
||||
*/
|
||||
// The index of the entry that has the max value. Reference above is incorrect.
|
||||
public int maxIndex() {
|
||||
@@ -605,8 +626,10 @@ public class FloatDict {
|
||||
|
||||
|
||||
/**
|
||||
* Remove a key/value pair
|
||||
*
|
||||
* @webref floatdict:method
|
||||
* @brief Remove a key/value pair
|
||||
* @webBrief Remove a key/value pair
|
||||
*/
|
||||
public float remove(String key) {
|
||||
int index = index(key);
|
||||
@@ -655,7 +678,7 @@ public class FloatDict {
|
||||
* tie-breaker (only really possible with a key that has a case change).
|
||||
*
|
||||
* @webref floatdict:method
|
||||
* @brief Sort the keys alphabetically
|
||||
* @webBrief Sort the keys alphabetically
|
||||
*/
|
||||
public void sortKeys() {
|
||||
sortImpl(true, false, true);
|
||||
@@ -663,8 +686,10 @@ public class FloatDict {
|
||||
|
||||
|
||||
/**
|
||||
* Sort the keys alphabetically in reverse
|
||||
*
|
||||
* @webref floatdict:method
|
||||
* @brief Sort the keys alphabetically in reverse
|
||||
* @webBrief Sort the keys alphabetically in reverse
|
||||
*/
|
||||
public void sortKeysReverse() {
|
||||
sortImpl(true, true, true);
|
||||
@@ -675,7 +700,7 @@ public class FloatDict {
|
||||
* Sort by values in descending order (largest value will be at [0]).
|
||||
*
|
||||
* @webref floatdict:method
|
||||
* @brief Sort by values in ascending order
|
||||
* @webBrief Sort by values in ascending order
|
||||
*/
|
||||
public void sortValues() {
|
||||
sortValues(true);
|
||||
@@ -693,8 +718,10 @@ public class FloatDict {
|
||||
|
||||
|
||||
/**
|
||||
* Sort by values in descending order
|
||||
*
|
||||
* @webref floatdict:method
|
||||
* @brief Sort by values in descending order
|
||||
* @webBrief Sort by values in descending order
|
||||
*/
|
||||
public void sortValuesReverse() {
|
||||
sortValuesReverse(true);
|
||||
|
||||
Reference in New Issue
Block a user