added javadoc to primitiveValue methods

git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/lang/trunk@151304 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Henri Yandell 2005-02-04 03:07:18 +00:00
parent 8520859c40
commit 2c13ceefd8
6 changed files with 142 additions and 6 deletions

View File

@ -21,7 +21,7 @@ package org.apache.commons.lang.mutable;
*
* @see Byte
* @since 2.1
* @version $Id: MutableByte.java,v 1.6 2004/10/08 19:45:46 ggregory Exp $
* @version $Id$
*/
public class MutableByte extends Number implements Comparable, Mutable {
@ -97,22 +97,48 @@ public class MutableByte extends Number implements Comparable, Mutable {
}
//-----------------------------------------------------------------------
// shortValue relies on Number implementation
/**
* Returns the value of this MutableByte as a byte.
*
* @return the numeric value represented by this object after conversion to type byte.
*/
public byte byteValue() {
return value;
}
/**
* Returns the value of this MutableByte as a int.
*
* @return the numeric value represented by this object after conversion to type int.
*/
public int intValue() {
return value;
}
/**
* Returns the value of this MutableByte as a long.
*
* @return the numeric value represented by this object after conversion to type long.
*/
public long longValue() {
return value;
}
/**
* Returns the value of this MutableByte as a float.
*
* @return the numeric value represented by this object after conversion to type float.
*/
public float floatValue() {
return value;
}
/**
* Returns the value of this MutableByte as a double.
*
* @return the numeric value represented by this object after conversion to type double.
*/
public double doubleValue() {
return value;
}

View File

@ -23,7 +23,7 @@ import org.apache.commons.lang.math.NumberUtils;
*
* @see Double
* @since 2.1
* @version $Id: MutableDouble.java,v 1.5 2004/10/08 19:45:46 ggregory Exp $
* @version $Id$
*/
public class MutableDouble extends Number implements Comparable, Mutable {
@ -99,18 +99,39 @@ public class MutableDouble extends Number implements Comparable, Mutable {
}
//-----------------------------------------------------------------------
// shortValue and bytValue rely on Number implementation
/**
* Returns the value of this MutableDouble as a int.
*
* @return the numeric value represented by this object after conversion to type int.
*/
public int intValue() {
return (int) value;
}
/**
* Returns the value of this MutableDouble as a long.
*
* @return the numeric value represented by this object after conversion to type long.
*/
public long longValue() {
return (long) value;
}
/**
* Returns the value of this MutableDouble as a float.
*
* @return the numeric value represented by this object after conversion to type float.
*/
public float floatValue() {
return (float) value;
}
/**
* Returns the value of this MutableDouble as a double.
*
* @return the numeric value represented by this object after conversion to type double.
*/
public double doubleValue() {
return value;
}

View File

@ -23,7 +23,7 @@ import org.apache.commons.lang.math.NumberUtils;
*
* @see Float
* @since 2.1
* @version $Id: MutableFloat.java,v 1.7 2004/10/08 21:33:03 scolebourne Exp $
* @version $Id$
*/
public class MutableFloat extends Number implements Comparable, Mutable {
@ -99,18 +99,39 @@ public class MutableFloat extends Number implements Comparable, Mutable {
}
//-----------------------------------------------------------------------
// shortValue and bytValue rely on Number implementation
/**
* Returns the value of this MutableFloat as a int.
*
* @return the numeric value represented by this object after conversion to type int.
*/
public int intValue() {
return (int) value;
}
/**
* Returns the value of this MutableFloat as a long.
*
* @return the numeric value represented by this object after conversion to type long.
*/
public long longValue() {
return (long) value;
}
/**
* Returns the value of this MutableFloat as a float.
*
* @return the numeric value represented by this object after conversion to type float.
*/
public float floatValue() {
return value;
}
/**
* Returns the value of this MutableFloat as a double.
*
* @return the numeric value represented by this object after conversion to type double.
*/
public double doubleValue() {
return value;
}

View File

@ -21,7 +21,7 @@ package org.apache.commons.lang.mutable;
*
* @see Integer
* @since 2.1
* @version $Id: MutableInt.java,v 1.4 2004/10/08 19:45:46 ggregory Exp $
* @version $Id$
*/
public class MutableInt extends Number implements Comparable, Mutable {
@ -97,18 +97,39 @@ public class MutableInt extends Number implements Comparable, Mutable {
}
//-----------------------------------------------------------------------
// shortValue and bytValue rely on Number implementation
/**
* Returns the value of this MutableInt as a int.
*
* @return the numeric value represented by this object after conversion to type int.
*/
public int intValue() {
return value;
}
/**
* Returns the value of this MutableInt as a long.
*
* @return the numeric value represented by this object after conversion to type long.
*/
public long longValue() {
return value;
}
/**
* Returns the value of this MutableInt as a float.
*
* @return the numeric value represented by this object after conversion to type float.
*/
public float floatValue() {
return value;
}
/**
* Returns the value of this MutableInt as a double.
*
* @return the numeric value represented by this object after conversion to type double.
*/
public double doubleValue() {
return value;
}

View File

@ -21,7 +21,7 @@ package org.apache.commons.lang.mutable;
*
* @see Long
* @since 2.1
* @version $Id: MutableLong.java,v 1.6 2004/10/08 19:45:46 ggregory Exp $
* @version $Id$
*/
public class MutableLong extends Number implements Comparable, Mutable {
@ -97,18 +97,39 @@ public class MutableLong extends Number implements Comparable, Mutable {
}
//-----------------------------------------------------------------------
// shortValue and bytValue rely on Number implementation
/**
* Returns the value of this MutableLong as a int.
*
* @return the numeric value represented by this object after conversion to type int.
*/
public int intValue() {
return (int) value;
}
/**
* Returns the value of this MutableLong as a long.
*
* @return the numeric value represented by this object after conversion to type long.
*/
public long longValue() {
return value;
}
/**
* Returns the value of this MutableLong as a float.
*
* @return the numeric value represented by this object after conversion to type float.
*/
public float floatValue() {
return value;
}
/**
* Returns the value of this MutableLong as a double.
*
* @return the numeric value represented by this object after conversion to type double.
*/
public double doubleValue() {
return value;
}

View File

@ -21,7 +21,7 @@ package org.apache.commons.lang.mutable;
*
* @see Short
* @since 2.1
* @version $Id: MutableShort.java,v 1.6 2004/10/08 19:45:46 ggregory Exp $
* @version $Id$
*/
public class MutableShort extends Number implements Comparable, Mutable {
@ -97,22 +97,48 @@ public class MutableShort extends Number implements Comparable, Mutable {
}
//-----------------------------------------------------------------------
// bytValue relies on Number implementation
/**
* Returns the value of this MutableShort as a short.
*
* @return the numeric value represented by this object after conversion to type short.
*/
public short shortValue() {
return value;
}
/**
* Returns the value of this MutableShort as a int.
*
* @return the numeric value represented by this object after conversion to type int.
*/
public int intValue() {
return value;
}
/**
* Returns the value of this MutableShort as a long.
*
* @return the numeric value represented by this object after conversion to type long.
*/
public long longValue() {
return value;
}
/**
* Returns the value of this MutableShort as a float.
*
* @return the numeric value represented by this object after conversion to type float.
*/
public float floatValue() {
return value;
}
/**
* Returns the value of this MutableShort as a double.
*
* @return the numeric value represented by this object after conversion to type double.
*/
public double doubleValue() {
return value;
}