Javadoc changes
bug 22480, from Pete Gieser git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/lang/trunk@137607 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
89d68fcd96
commit
6ed0e0b718
|
@ -76,8 +76,9 @@
|
||||||
* @author Nikolay Metchev
|
* @author Nikolay Metchev
|
||||||
* @author Matthew Hawthorne
|
* @author Matthew Hawthorne
|
||||||
* @author Tim O'Brien
|
* @author Tim O'Brien
|
||||||
|
* @author Pete Gieser
|
||||||
* @since 2.0
|
* @since 2.0
|
||||||
* @version $Id: ArrayUtils.java,v 1.22 2003/08/03 23:29:19 scolebourne Exp $
|
* @version $Id: ArrayUtils.java,v 1.23 2003/08/16 11:04:46 scolebourne Exp $
|
||||||
*/
|
*/
|
||||||
public class ArrayUtils {
|
public class ArrayUtils {
|
||||||
|
|
||||||
|
@ -1531,6 +1532,7 @@ public static int lastIndexOf(final double[] array, final double valueToFind, in
|
||||||
* @param array the array to traverse for looking for the object, may be <code>null</code>
|
* @param array the array to traverse for looking for the object, may be <code>null</code>
|
||||||
* @param valueToFind the value to find
|
* @param valueToFind the value to find
|
||||||
* @param startIndex the start index to travers backwards from
|
* @param startIndex the start index to travers backwards from
|
||||||
|
* @param tolerance search for value within plus/minus this amount
|
||||||
* @return the last index of the value within the array,
|
* @return the last index of the value within the array,
|
||||||
* <code>-1</code> if not found or <code>null</code> array input
|
* <code>-1</code> if not found or <code>null</code> array input
|
||||||
*/
|
*/
|
||||||
|
@ -1574,9 +1576,10 @@ public static boolean contains(final double[] array, final double valueToFind) {
|
||||||
* <p>The method returns <code>false</code> if a <code>null</code> array
|
* <p>The method returns <code>false</code> if a <code>null</code> array
|
||||||
* is passed in.</p>
|
* is passed in.</p>
|
||||||
*
|
*
|
||||||
* @param array the array to search
|
* @param array the array to search
|
||||||
* @param valueToFind the value to find
|
* @param valueToFind the value to find
|
||||||
* @param tolerance the array contains the tolerance of the search.
|
* @param tolerance the array contains the tolerance of the search
|
||||||
|
* @return true if value falling within tolerance is in array
|
||||||
*/
|
*/
|
||||||
public static boolean contains(final double[] array, final double valueToFind, final double tolerance) {
|
public static boolean contains(final double[] array, final double valueToFind, final double tolerance) {
|
||||||
return (indexOf(array, valueToFind, 0, tolerance) != -1);
|
return (indexOf(array, valueToFind, 0, tolerance) != -1);
|
||||||
|
|
|
@ -62,20 +62,21 @@
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <p>A set of characters.</p>
|
* <p>A set of characters.</p>
|
||||||
*
|
*
|
||||||
* <p>This class is immutable, but subclasses may not be.</p>
|
* <p>This class is immutable, but subclasses may not be.</p>
|
||||||
*
|
*
|
||||||
* @author Henri Yandell
|
* @author Henri Yandell
|
||||||
* @author Stephen Colebourne
|
* @author Stephen Colebourne
|
||||||
* @author Phil Steitz
|
* @author Phil Steitz
|
||||||
|
* @author Pete Gieser
|
||||||
* @since 1.0
|
* @since 1.0
|
||||||
* @version $Id: CharSet.java,v 1.14 2003/08/07 21:12:19 bayard Exp $
|
* @version $Id: CharSet.java,v 1.15 2003/08/16 11:04:46 scolebourne Exp $
|
||||||
*/
|
*/
|
||||||
public class CharSet implements Serializable {
|
public class CharSet implements Serializable {
|
||||||
|
|
||||||
/** Serialization lock, Lang version 2.0. */
|
/** Serialization lock, Lang version 2.0. */
|
||||||
private static final long serialVersionUID = 5947847346149275958L;
|
private static final long serialVersionUID = 5947847346149275958L;
|
||||||
|
|
||||||
/** A CharSet defining no characters. */
|
/** A CharSet defining no characters. */
|
||||||
public static final CharSet EMPTY = new CharSet((String) null);
|
public static final CharSet EMPTY = new CharSet((String) null);
|
||||||
/** A CharSet defining ASCII alphabetic characters "a-zA-Z". */
|
/** A CharSet defining ASCII alphabetic characters "a-zA-Z". */
|
||||||
|
@ -86,7 +87,7 @@ public class CharSet implements Serializable {
|
||||||
public static final CharSet ASCII_ALPHA_UPPER = new CharSet("A-Z");
|
public static final CharSet ASCII_ALPHA_UPPER = new CharSet("A-Z");
|
||||||
/** A CharSet defining ASCII alphabetic characters "0-9". */
|
/** A CharSet defining ASCII alphabetic characters "0-9". */
|
||||||
public static final CharSet ASCII_NUMERIC = new CharSet("0-9");
|
public static final CharSet ASCII_NUMERIC = new CharSet("0-9");
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A Map of the common cases used in the factory.
|
* A Map of the common cases used in the factory.
|
||||||
* Subclasses can add more common patterns if desired.
|
* Subclasses can add more common patterns if desired.
|
||||||
|
@ -101,14 +102,14 @@ public class CharSet implements Serializable {
|
||||||
COMMON.put("A-Z", ASCII_ALPHA_UPPER);
|
COMMON.put("A-Z", ASCII_ALPHA_UPPER);
|
||||||
COMMON.put("0-9", ASCII_NUMERIC);
|
COMMON.put("0-9", ASCII_NUMERIC);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** The set of CharRange objects. */
|
/** The set of CharRange objects. */
|
||||||
private Set set = new HashSet();
|
private Set set = new HashSet();
|
||||||
|
|
||||||
//-----------------------------------------------------------------------
|
//-----------------------------------------------------------------------
|
||||||
/**
|
/**
|
||||||
* <p>Factory method to create a new CharSet using a special syntax.</p>
|
* <p>Factory method to create a new CharSet using a special syntax.</p>
|
||||||
*
|
*
|
||||||
* <ul>
|
* <ul>
|
||||||
* <li><code>null</code> or empty string ("")
|
* <li><code>null</code> or empty string ("")
|
||||||
* - set containing no characters</li>
|
* - set containing no characters</li>
|
||||||
|
@ -121,7 +122,7 @@ public class CharSet implements Serializable {
|
||||||
* <li>Combinations, such as "abe-g"
|
* <li>Combinations, such as "abe-g"
|
||||||
* - set containing all the characters from the individual sets</li>
|
* - set containing all the characters from the individual sets</li>
|
||||||
* </ul>
|
* </ul>
|
||||||
*
|
*
|
||||||
* <p>The matching order is:</p>
|
* <p>The matching order is:</p>
|
||||||
* <ol
|
* <ol
|
||||||
* <li>Negated multi character range, such as "^a-e"
|
* <li>Negated multi character range, such as "^a-e"
|
||||||
|
@ -131,7 +132,7 @@ public class CharSet implements Serializable {
|
||||||
* </ol>
|
* </ol>
|
||||||
* <p>Matching works left to right. Once a match is found the
|
* <p>Matching works left to right. Once a match is found the
|
||||||
* search starts again from the next character.</p>
|
* search starts again from the next character.</p>
|
||||||
*
|
*
|
||||||
* <p>If the same range is defined twice using the same syntax, only
|
* <p>If the same range is defined twice using the same syntax, only
|
||||||
* one range will be kept.
|
* one range will be kept.
|
||||||
* Thus, "a-ca-c" creates only one range of "a-c".</p>
|
* Thus, "a-ca-c" creates only one range of "a-c".</p>
|
||||||
|
@ -144,8 +145,9 @@ public class CharSet implements Serializable {
|
||||||
* <p>The set of characters represented is the union of the specified ranges.</p>
|
* <p>The set of characters represented is the union of the specified ranges.</p>
|
||||||
*
|
*
|
||||||
* <p>All CharSet objects returned by this method will be immutable.</p>
|
* <p>All CharSet objects returned by this method will be immutable.</p>
|
||||||
*
|
*
|
||||||
* @param setStr the String describing the set, may be null
|
* @param setStr the String describing the set, may be null
|
||||||
|
* @return a CharSet instance
|
||||||
*/
|
*/
|
||||||
public static CharSet getInstance(String setStr) {
|
public static CharSet getInstance(String setStr) {
|
||||||
Object set = COMMON.get(setStr);
|
Object set = COMMON.get(setStr);
|
||||||
|
@ -170,6 +172,7 @@ protected CharSet(String setStr) {
|
||||||
* <p>Constructs a new CharSet using the set syntax.
|
* <p>Constructs a new CharSet using the set syntax.
|
||||||
* Each string is merged in with the set.</p>
|
* Each string is merged in with the set.</p>
|
||||||
*
|
*
|
||||||
|
* @param set Strings to merge into the initial set
|
||||||
* @throws NullPointerException if set is <code>null</code>
|
* @throws NullPointerException if set is <code>null</code>
|
||||||
*/
|
*/
|
||||||
protected CharSet(String[] set) {
|
protected CharSet(String[] set) {
|
||||||
|
@ -183,7 +186,7 @@ protected CharSet(String[] set) {
|
||||||
//-----------------------------------------------------------------------
|
//-----------------------------------------------------------------------
|
||||||
/**
|
/**
|
||||||
* <p>Add a set definition string to the <code>CharSet</code>.</p>
|
* <p>Add a set definition string to the <code>CharSet</code>.</p>
|
||||||
*
|
*
|
||||||
* @param str set definition string
|
* @param str set definition string
|
||||||
*/
|
*/
|
||||||
protected void add(String str) {
|
protected void add(String str) {
|
||||||
|
@ -218,18 +221,18 @@ protected void add(String str) {
|
||||||
//-----------------------------------------------------------------------
|
//-----------------------------------------------------------------------
|
||||||
/**
|
/**
|
||||||
* <p>Gets the internal set as an array of CharRange objects.</p>
|
* <p>Gets the internal set as an array of CharRange objects.</p>
|
||||||
*
|
*
|
||||||
* @return an array of immutable CharRange objects
|
* @return an array of immutable CharRange objects
|
||||||
*/
|
*/
|
||||||
public CharRange[] getCharRanges() {
|
public CharRange[] getCharRanges() {
|
||||||
return (CharRange[]) set.toArray(new CharRange[set.size()]);
|
return (CharRange[]) set.toArray(new CharRange[set.size()]);
|
||||||
}
|
}
|
||||||
|
|
||||||
//-----------------------------------------------------------------------
|
//-----------------------------------------------------------------------
|
||||||
/**
|
/**
|
||||||
* <p>Does the <code>CharSet</code> contain the specified
|
* <p>Does the <code>CharSet</code> contain the specified
|
||||||
* character <code>ch</code>.</p>
|
* character <code>ch</code>.</p>
|
||||||
*
|
*
|
||||||
* @param ch the character to check for
|
* @param ch the character to check for
|
||||||
* @return <code>true</code> if the set contains the characters
|
* @return <code>true</code> if the set contains the characters
|
||||||
*/
|
*/
|
||||||
|
@ -248,11 +251,10 @@ public boolean contains(char ch) {
|
||||||
/**
|
/**
|
||||||
* <p>Compares two CharSet objects, returning true if they represent
|
* <p>Compares two CharSet objects, returning true if they represent
|
||||||
* exactly the same set of characters defined in the same way.</p>
|
* exactly the same set of characters defined in the same way.</p>
|
||||||
*
|
*
|
||||||
* <p>The two sets <code>abc</code> and <code>a-c</code> are <i>not</i>
|
* <p>The two sets <code>abc</code> and <code>a-c</code> are <i>not</i>
|
||||||
* equal according to this method.</p>
|
* equal according to this method.</p>
|
||||||
*
|
*
|
||||||
*
|
|
||||||
* @param obj the object to compare to
|
* @param obj the object to compare to
|
||||||
* @return true if equal
|
* @return true if equal
|
||||||
*/
|
*/
|
||||||
|
@ -269,16 +271,16 @@ public boolean equals(Object obj) {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <p>Gets a hashCode compatable with the equals method.</p>
|
* <p>Gets a hashCode compatable with the equals method.</p>
|
||||||
*
|
*
|
||||||
* @return a suitable hashCode
|
* @return a suitable hashCode
|
||||||
*/
|
*/
|
||||||
public int hashCode() {
|
public int hashCode() {
|
||||||
return 89 + set.hashCode();
|
return 89 + set.hashCode();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <p>Gets a string representation of the set.</p>
|
* <p>Gets a string representation of the set.</p>
|
||||||
*
|
*
|
||||||
* @return string representation of the set
|
* @return string representation of the set
|
||||||
*/
|
*/
|
||||||
public String toString() {
|
public String toString() {
|
||||||
|
|
|
@ -72,8 +72,9 @@
|
||||||
* @author <a href="sean@boohai.com">Sean Brown</a>
|
* @author <a href="sean@boohai.com">Sean Brown</a>
|
||||||
* @author <a href="mailto:ggregory@seagullsw.com">Gary Gregory</a>
|
* @author <a href="mailto:ggregory@seagullsw.com">Gary Gregory</a>
|
||||||
* @author Phil Steitz
|
* @author Phil Steitz
|
||||||
|
* @author Pete Gieser
|
||||||
* @since 2.0
|
* @since 2.0
|
||||||
* @version $Id: StringEscapeUtils.java,v 1.23 2003/08/01 20:45:17 scolebourne Exp $
|
* @version $Id: StringEscapeUtils.java,v 1.24 2003/08/16 11:04:46 scolebourne Exp $
|
||||||
*/
|
*/
|
||||||
public class StringEscapeUtils {
|
public class StringEscapeUtils {
|
||||||
|
|
||||||
|
@ -308,6 +309,7 @@ public static String unescapeJava(String str) {
|
||||||
* @param out the <code>Writer</code> used to output unescaped characters
|
* @param out the <code>Writer</code> used to output unescaped characters
|
||||||
* @param str the <code>String</code> to unescape, may be null
|
* @param str the <code>String</code> to unescape, may be null
|
||||||
* @throws IllegalArgumentException if the Writer is <code>null</code>
|
* @throws IllegalArgumentException if the Writer is <code>null</code>
|
||||||
|
* @throws IOException if error occurs on undelying Writer
|
||||||
*/
|
*/
|
||||||
public static void unescapeJava(Writer out, String str) throws IOException {
|
public static void unescapeJava(Writer out, String str) throws IOException {
|
||||||
if (out == null) {
|
if (out == null) {
|
||||||
|
@ -422,6 +424,7 @@ public static String unescapeJavaScript(String str) {
|
||||||
* @param out the <code>Writer</code> used to output unescaped characters
|
* @param out the <code>Writer</code> used to output unescaped characters
|
||||||
* @param str the <code>String</code> to unescape, may be null
|
* @param str the <code>String</code> to unescape, may be null
|
||||||
* @throws IllegalArgumentException if the Writer is <code>null</code>
|
* @throws IllegalArgumentException if the Writer is <code>null</code>
|
||||||
|
* @throws IOException if error occurs on undelying Writer
|
||||||
*/
|
*/
|
||||||
public static void unescapeJavaScript(Writer out, String str) throws IOException {
|
public static void unescapeJavaScript(Writer out, String str) throws IOException {
|
||||||
unescapeJava(out, str);
|
unescapeJava(out, str);
|
||||||
|
|
|
@ -30,5 +30,6 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</pre>
|
</pre>
|
||||||
|
@since 1.0
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
|
@ -78,8 +78,9 @@
|
||||||
* @author Dmitri Plotnikov
|
* @author Dmitri Plotnikov
|
||||||
* @author Stephen Colebourne
|
* @author Stephen Colebourne
|
||||||
* @author <a href="mailto:ggregory@seagullsw.com">Gary Gregory</a>
|
* @author <a href="mailto:ggregory@seagullsw.com">Gary Gregory</a>
|
||||||
|
* @author Pete Gieser
|
||||||
* @since 1.0
|
* @since 1.0
|
||||||
* @version $Id: ExceptionUtils.java,v 1.31 2003/07/31 23:45:28 scolebourne Exp $
|
* @version $Id: ExceptionUtils.java,v 1.32 2003/08/16 11:15:20 scolebourne Exp $
|
||||||
*/
|
*/
|
||||||
public class ExceptionUtils {
|
public class ExceptionUtils {
|
||||||
|
|
||||||
|
@ -180,9 +181,9 @@ public static Throwable getCause(Throwable throwable) {
|
||||||
* <p>Introspects the <code>Throwable</code> to obtain the cause.</p>
|
* <p>Introspects the <code>Throwable</code> to obtain the cause.</p>
|
||||||
*
|
*
|
||||||
* <ol>
|
* <ol>
|
||||||
* <li>Try known exception types.</p>
|
* <li>Try known exception types.</li>
|
||||||
* <li>Try the supplied array of method names.</p>
|
* <li>Try the supplied array of method names.</li>
|
||||||
* <li>Try the field 'detail'.</p>
|
* <li>Try the field 'detail'.</li>
|
||||||
* </ol>
|
* </ol>
|
||||||
*
|
*
|
||||||
* <p>A <code>null</code> set of method names means use the default set.
|
* <p>A <code>null</code> set of method names means use the default set.
|
||||||
|
|
|
@ -64,14 +64,17 @@
|
||||||
* @author <a href="mailto:dlr@collab.net">Daniel Rall</a>
|
* @author <a href="mailto:dlr@collab.net">Daniel Rall</a>
|
||||||
* @author <a href="mailto:knielsen@apache.org">Kasper Nielsen</a>
|
* @author <a href="mailto:knielsen@apache.org">Kasper Nielsen</a>
|
||||||
* @author <a href="mailto:steven@caswell.name">Steven Caswell</a>
|
* @author <a href="mailto:steven@caswell.name">Steven Caswell</a>
|
||||||
|
* @author Pete Gieser
|
||||||
* @since 1.0
|
* @since 1.0
|
||||||
* @version $Id: Nestable.java,v 1.7 2003/07/26 13:00:36 scolebourne Exp $
|
* @version $Id: Nestable.java,v 1.8 2003/08/16 11:15:20 scolebourne Exp $
|
||||||
*/
|
*/
|
||||||
public interface Nestable {
|
public interface Nestable {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the reference to the exception or error that caused the
|
* Returns the reference to the exception or error that caused the
|
||||||
* exception implementing the <code>Nestable</code> to be thrown.
|
* exception implementing the <code>Nestable</code> to be thrown.
|
||||||
|
*
|
||||||
|
* @return throwable that caused the original exception
|
||||||
*/
|
*/
|
||||||
public Throwable getCause();
|
public Throwable getCause();
|
||||||
|
|
||||||
|
|
|
@ -6,5 +6,6 @@
|
||||||
Exception which can handle JDK 1.4 Exceptions as well as others. </p>
|
Exception which can handle JDK 1.4 Exceptions as well as others. </p>
|
||||||
<p>Lastly, {@link org.apache.commons.lang.exception.ExceptionUtils}
|
<p>Lastly, {@link org.apache.commons.lang.exception.ExceptionUtils}
|
||||||
also contains <code>Throwable</code> manipulation and examination routines.</p>
|
also contains <code>Throwable</code> manipulation and examination routines.</p>
|
||||||
|
@since 1.0
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
|
@ -65,29 +65,62 @@
|
||||||
* @author Travis Reeder
|
* @author Travis Reeder
|
||||||
* @author Stephen Colebourne
|
* @author Stephen Colebourne
|
||||||
* @author Tim O'Brien
|
* @author Tim O'Brien
|
||||||
|
* @author Pete Gieser
|
||||||
* @since 2.0
|
* @since 2.0
|
||||||
* @version $Id: Fraction.java,v 1.9 2003/08/13 23:42:17 scolebourne Exp $
|
* @version $Id: Fraction.java,v 1.10 2003/08/16 11:14:01 scolebourne Exp $
|
||||||
*/
|
*/
|
||||||
public final class Fraction extends Number implements Serializable, Comparable {
|
public final class Fraction extends Number implements Serializable, Comparable {
|
||||||
|
|
||||||
/** Serialization lock, Lang version 2.0 */
|
/** Serialization lock, Lang version 2.0 */
|
||||||
private static final long serialVersionUID = 65382027393090L;
|
private static final long serialVersionUID = 65382027393090L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <code>Fraction</code> representation of 0.
|
||||||
|
*/
|
||||||
public static final Fraction ZERO = new Fraction(0, 1);
|
public static final Fraction ZERO = new Fraction(0, 1);
|
||||||
|
/**
|
||||||
|
* <code>Fraction</code> representation of 1.
|
||||||
|
*/
|
||||||
public static final Fraction ONE = new Fraction(1, 1);
|
public static final Fraction ONE = new Fraction(1, 1);
|
||||||
|
/**
|
||||||
|
* <code>Fraction</code> representation of 1/2.
|
||||||
|
*/
|
||||||
public static final Fraction ONE_HALF = new Fraction(1, 2);
|
public static final Fraction ONE_HALF = new Fraction(1, 2);
|
||||||
|
/**
|
||||||
|
* <code>Fraction</code> representation of 1/3.
|
||||||
|
*/
|
||||||
public static final Fraction ONE_THIRD = new Fraction(1, 3);
|
public static final Fraction ONE_THIRD = new Fraction(1, 3);
|
||||||
|
/**
|
||||||
|
* <code>Fraction</code> representation of 2/3.
|
||||||
|
*/
|
||||||
public static final Fraction TWO_THIRDS = new Fraction(2, 3);
|
public static final Fraction TWO_THIRDS = new Fraction(2, 3);
|
||||||
|
/**
|
||||||
|
* <code>Fraction</code> representation of 1/4.
|
||||||
|
*/
|
||||||
public static final Fraction ONE_QUARTER = new Fraction(1, 4);
|
public static final Fraction ONE_QUARTER = new Fraction(1, 4);
|
||||||
|
/**
|
||||||
|
* <code>Fraction</code> representation of 2/4.
|
||||||
|
*/
|
||||||
public static final Fraction TWO_QUARTERS = new Fraction(2, 4);
|
public static final Fraction TWO_QUARTERS = new Fraction(2, 4);
|
||||||
|
/**
|
||||||
|
* <code>Fraction</code> representation of 3/4.
|
||||||
|
*/
|
||||||
public static final Fraction THREE_QUARTERS = new Fraction(3, 4);
|
public static final Fraction THREE_QUARTERS = new Fraction(3, 4);
|
||||||
|
/**
|
||||||
|
* <code>Fraction</code> representation of 1/5.
|
||||||
|
*/
|
||||||
public static final Fraction ONE_FIFTH = new Fraction(1, 5);
|
public static final Fraction ONE_FIFTH = new Fraction(1, 5);
|
||||||
|
/**
|
||||||
|
* <code>Fraction</code> representation of 2/5.
|
||||||
|
*/
|
||||||
public static final Fraction TWO_FIFTHS = new Fraction(2, 5);
|
public static final Fraction TWO_FIFTHS = new Fraction(2, 5);
|
||||||
|
/**
|
||||||
|
* <code>Fraction</code> representation of 3/5.
|
||||||
|
*/
|
||||||
public static final Fraction THREE_FIFTHS = new Fraction(3, 5);
|
public static final Fraction THREE_FIFTHS = new Fraction(3, 5);
|
||||||
|
/**
|
||||||
|
* <code>Fraction</code> representation of 4/5.
|
||||||
|
*/
|
||||||
public static final Fraction FOUR_FIFTHS = new Fraction(4, 5);
|
public static final Fraction FOUR_FIFTHS = new Fraction(4, 5);
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -2,5 +2,6 @@
|
||||||
<body>
|
<body>
|
||||||
Extends <code>java.math</code> for business mathematical classes. This package is intended for business
|
Extends <code>java.math</code> for business mathematical classes. This package is intended for business
|
||||||
mathematical classes, not scientific ones.
|
mathematical classes, not scientific ones.
|
||||||
|
@since 2.0
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
|
@ -2,5 +2,6 @@
|
||||||
<body>
|
<body>
|
||||||
Provides highly reusable static utility methods, chiefly concerned
|
Provides highly reusable static utility methods, chiefly concerned
|
||||||
with adding value to <code>java.lang</code> and other standard core classes.
|
with adding value to <code>java.lang</code> and other standard core classes.
|
||||||
|
@since 1.0
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
|
@ -71,15 +71,18 @@
|
||||||
* @author Based on code from <code>BeanUtils</code> by: Craig R. McClanahan
|
* @author Based on code from <code>BeanUtils</code> by: Craig R. McClanahan
|
||||||
* @author Ralph Schaer
|
* @author Ralph Schaer
|
||||||
* @author Chris Audley
|
* @author Chris Audley
|
||||||
* @author Rey François
|
* @author Rey Fran<EFBFBD>ois
|
||||||
* @author Gregor Raýman
|
* @author Gregor Ra<EFBFBD>man
|
||||||
* @author Jan Sorensen
|
* @author Jan Sorensen
|
||||||
* @author Robert Burrell Donkin
|
* @author Robert Burrell Donkin
|
||||||
* @author Gary Gregory
|
* @author Gary Gregory
|
||||||
* @version $Id: MethodUtils.java,v 1.13 2003/07/20 01:13:54 ggregory Exp $
|
* @version $Id: MethodUtils.java,v 1.14 2003/08/16 11:10:23 scolebourne Exp $
|
||||||
*/
|
*/
|
||||||
public class MethodUtils {
|
public class MethodUtils {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Debug flag.
|
||||||
|
*/
|
||||||
public static final boolean debug = false;
|
public static final boolean debug = false;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -120,6 +123,7 @@ public static Method getMethod(Class cls, String methodName) {
|
||||||
*
|
*
|
||||||
* @param cls the class to reflect, must not be <code>null</code>
|
* @param cls the class to reflect, must not be <code>null</code>
|
||||||
* @param methodName the field name to obtain
|
* @param methodName the field name to obtain
|
||||||
|
* @param paramType the class of the parameter
|
||||||
* @return the Method object
|
* @return the Method object
|
||||||
* @throws IllegalArgumentException if the class or method name
|
* @throws IllegalArgumentException if the class or method name
|
||||||
* is <code>null</code>
|
* is <code>null</code>
|
||||||
|
@ -131,11 +135,13 @@ public static Method getMethod(Class cls, String methodName, Class paramType) {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <p>Gets a <code>Method</code> by name.</p> The method must be public.
|
* <p>Gets a <code>Method</code> by name.</p>
|
||||||
* Superclasses will be considered.</p>
|
*
|
||||||
|
* <p>The method must be public. Superclasses will be considered.</p>
|
||||||
*
|
*
|
||||||
* @param cls the class to reflect, must not be <code>null</code>
|
* @param cls the class to reflect, must not be <code>null</code>
|
||||||
* @param methodName the field name to obtain
|
* @param methodName the field name to obtain
|
||||||
|
* @param paramTypes the classes of the parameters
|
||||||
* @return the Method object
|
* @return the Method object
|
||||||
* @throws IllegalArgumentException if the class or method name
|
* @throws IllegalArgumentException if the class or method name
|
||||||
* is <code>null</code>
|
* is <code>null</code>
|
||||||
|
@ -150,6 +156,7 @@ public static Method getMethod(Class cls, String methodName, Class[] paramTypes)
|
||||||
*
|
*
|
||||||
* @param cls the class to reflect, must not be <code>null</code>
|
* @param cls the class to reflect, must not be <code>null</code>
|
||||||
* @param methodName the method name to obtain
|
* @param methodName the method name to obtain
|
||||||
|
* @param paramTypes the classes of the parameters
|
||||||
* @param breakScope whether to break scope restrictions using the
|
* @param breakScope whether to break scope restrictions using the
|
||||||
* <code>setAccessible</code> method. <code>False</code> will only
|
* <code>setAccessible</code> method. <code>False</code> will only
|
||||||
* match public fields.
|
* match public fields.
|
||||||
|
@ -226,6 +233,7 @@ public static Method getMethod(Class cls, String methodName, Class[] paramTypes,
|
||||||
* no such method can be found, return <code>null</code>.</p>
|
* no such method can be found, return <code>null</code>.</p>
|
||||||
*
|
*
|
||||||
* @param method The method that we wish to call
|
* @param method The method that we wish to call
|
||||||
|
* @return Method
|
||||||
*/
|
*/
|
||||||
public static Method getMethod(Method method) {
|
public static Method getMethod(Method method) {
|
||||||
|
|
||||||
|
@ -282,6 +290,7 @@ public static Method getMethod(Method method) {
|
||||||
* @param methodName get method with this name, must not
|
* @param methodName get method with this name, must not
|
||||||
* be <code>null</code>
|
* be <code>null</code>
|
||||||
* @param arg use this argument, must not be <code>null</code>
|
* @param arg use this argument, must not be <code>null</code>
|
||||||
|
* @return Object
|
||||||
* @throws ReflectionException if an error occurs during reflection
|
* @throws ReflectionException if an error occurs during reflection
|
||||||
* @throws IllegalArgumentException if any parameter is
|
* @throws IllegalArgumentException if any parameter is
|
||||||
* <code>null</code>
|
* <code>null</code>
|
||||||
|
@ -323,6 +332,7 @@ public static Object invokeMethod(
|
||||||
* be <code>null</code>
|
* be <code>null</code>
|
||||||
* @param args use these arguments - treat <code>null</code>
|
* @param args use these arguments - treat <code>null</code>
|
||||||
* as empty array
|
* as empty array
|
||||||
|
* @return Object
|
||||||
* @throws ReflectionException if an error occurs during reflection
|
* @throws ReflectionException if an error occurs during reflection
|
||||||
* @throws IllegalArgumentException if the objectToInvoke, methodName
|
* @throws IllegalArgumentException if the objectToInvoke, methodName
|
||||||
* or any argument is <code>null</code>
|
* or any argument is <code>null</code>
|
||||||
|
@ -368,6 +378,7 @@ public static Object invokeMethod(
|
||||||
* @param args use these arguments - treat null as empty array
|
* @param args use these arguments - treat null as empty array
|
||||||
* @param parameterTypes match these parameters - treat
|
* @param parameterTypes match these parameters - treat
|
||||||
* <code>null</code> as empty array
|
* <code>null</code> as empty array
|
||||||
|
* @return Object
|
||||||
* @throws ReflectionException if an error occurs during reflection
|
* @throws ReflectionException if an error occurs during reflection
|
||||||
*/
|
*/
|
||||||
public static Object invokeMethod(
|
public static Object invokeMethod(
|
||||||
|
|
|
@ -21,4 +21,6 @@ <h4>Java 1.3 And Below</h4>
|
||||||
The reflection implementation is slow and buggy.
|
The reflection implementation is slow and buggy.
|
||||||
If you are using one of these easier java versions, then you will probably find our code
|
If you are using one of these easier java versions, then you will probably find our code
|
||||||
more reliable than the standard java implementation.</p>
|
more reliable than the standard java implementation.</p>
|
||||||
|
@since 3.0
|
||||||
</body>
|
</body>
|
||||||
|
</html>
|
||||||
|
|
|
@ -74,7 +74,7 @@
|
||||||
* @author Janek Bogucki
|
* @author Janek Bogucki
|
||||||
* @author <a href="mailto:ggregory@seagullsw.com">Gary Gregory</a>
|
* @author <a href="mailto:ggregory@seagullsw.com">Gary Gregory</a>
|
||||||
* @since 2.0
|
* @since 2.0
|
||||||
* @version $Id: DateUtils.java,v 1.12 2003/08/15 16:14:35 bayard Exp $
|
* @version $Id: DateUtils.java,v 1.13 2003/08/16 11:09:26 scolebourne Exp $
|
||||||
*/
|
*/
|
||||||
public class DateUtils {
|
public class DateUtils {
|
||||||
|
|
||||||
|
@ -154,7 +154,7 @@ public class DateUtils {
|
||||||
public final static int RANGE_MONTH_MONDAY = 6;
|
public final static int RANGE_MONTH_MONDAY = 6;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <p><code>DateUtils<code> instances should NOT be constructed in
|
* <p><code>DateUtils</code> instances should NOT be constructed in
|
||||||
* standard programming. Instead, the class should be used as
|
* standard programming. Instead, the class should be used as
|
||||||
* <code>DateUtils.parse(str);</code>.</p>
|
* <code>DateUtils.parse(str);</code>.</p>
|
||||||
*
|
*
|
||||||
|
|
|
@ -10,5 +10,6 @@
|
||||||
<li><code>DateFormatUtils</code> - a formatting class for dates
|
<li><code>DateFormatUtils</code> - a formatting class for dates
|
||||||
<li><code>StopWatch</code> - a duration timer
|
<li><code>StopWatch</code> - a duration timer
|
||||||
</ul>
|
</ul>
|
||||||
|
@since 2.0
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
|
@ -56,14 +56,14 @@
|
||||||
/**
|
/**
|
||||||
* <p>Manage operations dealing with bit-mapped fields.</p>
|
* <p>Manage operations dealing with bit-mapped fields.</p>
|
||||||
*
|
*
|
||||||
* <p>Code originated from the POI project.</p>
|
* @author Apache Jakarta POI
|
||||||
*
|
|
||||||
* @author Scott Sanders (sanders at apache dot org)
|
* @author Scott Sanders (sanders at apache dot org)
|
||||||
* @author Marc Johnson (mjohnson at apache dot org)
|
* @author Marc Johnson (mjohnson at apache dot org)
|
||||||
* @author Andrew C. Oliver (acoliver at apache dot org)
|
* @author Andrew C. Oliver (acoliver at apache dot org)
|
||||||
* @author Stephen Colebourne
|
* @author Stephen Colebourne
|
||||||
|
* @author Pete Gieser
|
||||||
* @since 2.0
|
* @since 2.0
|
||||||
* @version $Id: BitField.java,v 1.6 2003/07/14 22:25:06 bayard Exp $
|
* @version $Id: BitField.java,v 1.7 2003/08/16 11:08:49 scolebourne Exp $
|
||||||
*/
|
*/
|
||||||
public class BitField {
|
public class BitField {
|
||||||
|
|
||||||
|
@ -100,6 +100,7 @@ public BitField(final int mask) {
|
||||||
* value is stored as a BitField (and so shifted left so many
|
* value is stored as a BitField (and so shifted left so many
|
||||||
* bits).</p>
|
* bits).</p>
|
||||||
*
|
*
|
||||||
|
* @see #setValue
|
||||||
* @param holder the int data containing the bits we're interested
|
* @param holder the int data containing the bits we're interested
|
||||||
* in
|
* in
|
||||||
* @return the selected bits, shifted right appropriately
|
* @return the selected bits, shifted right appropriately
|
||||||
|
@ -117,6 +118,7 @@ public int getValue(final int holder) {
|
||||||
* value is stored as a BitField (and so shifted left so many
|
* value is stored as a BitField (and so shifted left so many
|
||||||
* bits).</p>
|
* bits).</p>
|
||||||
*
|
*
|
||||||
|
* @see #setShortValue
|
||||||
* @param holder the short data containing the bits we're
|
* @param holder the short data containing the bits we're
|
||||||
* interested in
|
* interested in
|
||||||
* @return the selected bits, shifted right appropriately
|
* @return the selected bits, shifted right appropriately
|
||||||
|
@ -183,6 +185,7 @@ public boolean isAllSet(final int holder) {
|
||||||
/**
|
/**
|
||||||
* <p>Replace the bits with new values.</p>
|
* <p>Replace the bits with new values.</p>
|
||||||
*
|
*
|
||||||
|
* @see #getValue
|
||||||
* @param holder the int data containint the bits we're
|
* @param holder the int data containint the bits we're
|
||||||
* interested in
|
* interested in
|
||||||
* @param value the new value for the specified bits
|
* @param value the new value for the specified bits
|
||||||
|
@ -196,6 +199,7 @@ public int setValue(final int holder, final int value) {
|
||||||
/**
|
/**
|
||||||
* <p>Replace the bits with new values.</p>
|
* <p>Replace the bits with new values.</p>
|
||||||
*
|
*
|
||||||
|
* @see #getShortValue
|
||||||
* @param holder the short data containing the bits we're
|
* @param holder the short data containing the bits we're
|
||||||
* interested in
|
* interested in
|
||||||
* @param value the new value for the specified bits
|
* @param value the new value for the specified bits
|
||||||
|
|
|
@ -9,5 +9,6 @@
|
||||||
<li><code>IdentifierUtils</code> - for creating identifiers
|
<li><code>IdentifierUtils</code> - for creating identifiers
|
||||||
<li><code>Validate</code> - for validating values and throwing exceptions
|
<li><code>Validate</code> - for validating values and throwing exceptions
|
||||||
</ul>
|
</ul>
|
||||||
|
@since 2.0
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
Loading…
Reference in New Issue