Java Reference
In-Depth Information
public void set(T newElement) (Optional)
Replaces the last element returned by next() or previous() with newElement .
Cannot be used if there has been a call to add or remove since the last call to next()
or previous() .
Throws:
UnsupportedOperationException if the set operation is not supported by this Iterator .
IllegalStateException if neither next() nor previous() has been called, or the add or
remove method has been called since the last call to next() or previous() .
ClassCastException if the class of newElement prevents it from being added.
IllegalArgumentException if some property other than the class of newElement prevents
it from being added.
Long
This is a wrapper class for long . See Section 5.1 in Chapter 5.
Math
Package: java.lang
Object
|
+--Math
The Math class is marked final , which means it cannot be used as a base class to derive
other classes.
public static double abs( double argument)
public static float abs( float argument)
public static long abs( long argument)
public static int abs( int argument)
Returns the absolute value of the argument . (The method name abs is overloaded to produce
four similar methods.)
EXAMPLES
Math.abs(−6) and Math.abs(6) both return 6. Math.abs(−5.5) and Math.abs(5.5) both
return 5.5 .
public static double ceil( double argument)
Returns the smallest whole number greater than or equal to the argument .
EXAMPLE
Math.ceil(3.2) and Math.ceil(3.9) both return 4.0 .
public static double floor( double argument)
Returns the largest whole number less than or equal to the argument .
EXAMPLE
Math.floor (3.2) and Math.floor (3.9) both return 3.0 .
 
Search WWH ::




Custom Search