If this Index exists inside the passed Array and if it is != null
(int aIndex, E[] aArray)
| 1527 | |
| 1528 | /** If this Index exists inside the passed Array and if it is != null */ |
| 1529 | public static <E> boolean exists(int aIndex, E[] aArray) { |
| 1530 | return aIndex >= 0 && aIndex < aArray.length && aArray[aIndex] != null; |
| 1531 | } |
| 1532 | |
| 1533 | /** @return a Value for a Scale between 0 and aMax with aScale+1 possible Steps. 0 is only returned if the aValue is <= 0, aScale is only returned if the Value is >= aMax. The remaining values between ]0:aScale[ are returned for each Step of the Scale. This Function finds use in Displays such as the Barometer, but also in Redstone. */ |
| 1534 | public static long scale(long aValue, long aMax, long aScale, boolean aInvert) { |