svn:keywords correction
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/lang/trunk@155423 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
aef69406ea
commit
cd34d6423d
|
@ -1,4 +1,4 @@
|
|||
$Id: RELEASE-NOTES-2.0.txt,v 1.1 2004/02/23 04:36:06 ggregory Exp $
|
||||
$Id$
|
||||
|
||||
Commons Lang Package
|
||||
Version 2.0
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
|
||||
<div align="center">
|
||||
<h1>The Jakarta Commons <em>Lang</em> Component</h1>
|
||||
$Id: STATUS.html,v 1.53 2004/02/18 23:13:37 ggregory Exp $<br />
|
||||
$Id$<br />
|
||||
<a href="#Introduction">[Introduction]</a>
|
||||
<a href="#Dependencies">[Dependencies]</a>
|
||||
<a href="#Release Info">[Release Info]</a>
|
||||
|
|
|
@ -16,7 +16,7 @@ limitations under the License.
|
|||
<project name="Lang" default="compile" basedir=".">
|
||||
<!--
|
||||
"Lang" component of the Jakarta Commons Subproject
|
||||
$Id: build.xml,v 1.32 2004/10/21 00:36:37 ggregory Exp $
|
||||
$Id$
|
||||
-->
|
||||
<!-- ========== Initialize Properties ===================================== -->
|
||||
<property file="${user.home}/${component.name}.build.properties"/>
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
# limitations under the License.
|
||||
#
|
||||
|
||||
# $Id: checkstyle.properties,v 1.3 2004/02/18 23:13:37 ggregory Exp $
|
||||
# $Id$
|
||||
|
||||
checkstyle.ignore.public.in.interface=true
|
||||
checkstyle.require.packagehtml
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
# limitations under the License.
|
||||
#
|
||||
|
||||
# $Id: default.properties,v 1.18 2004/10/21 00:21:39 ggregory Exp $
|
||||
# $Id$
|
||||
|
||||
# The pathname of the "junit.jar" JAR file
|
||||
junit.jar = ${junit.home}/junit-3.7.jar
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
* @author Pete Gieser
|
||||
* @author Gary Gregory
|
||||
* @since 2.0
|
||||
* @version $Id: BitField.java,v 1.6 2004/08/15 02:12:51 bayard Exp $
|
||||
* @version $Id$
|
||||
*/
|
||||
public class BitField {
|
||||
|
||||
|
|
|
@ -28,7 +28,7 @@
|
|||
* @author Matthew Hawthorne
|
||||
* @author Gary Gregory
|
||||
* @since 2.0
|
||||
* @version $Id: BooleanUtils.java,v 1.19 2004/10/08 21:27:00 scolebourne Exp $
|
||||
* @version $Id$
|
||||
*/
|
||||
public class BooleanUtils {
|
||||
|
||||
|
|
|
@ -30,7 +30,7 @@
|
|||
* @see <a href="http://java.sun.com/j2se/1.3/docs/api/java/lang/package-summary.html#charenc">JRE character encoding names</a>
|
||||
* @author Apache Software Foundation
|
||||
* @since 2.1
|
||||
* @version $Id: CharEncoding.java,v 1.2 2004/10/06 21:40:09 scolebourne Exp $
|
||||
* @version $Id$
|
||||
*/
|
||||
public class CharEncoding {
|
||||
|
||||
|
|
|
@ -27,7 +27,7 @@
|
|||
* @author Chris Feldhacker
|
||||
* @author Gary Gregory
|
||||
* @since 1.0
|
||||
* @version $Id: CharRange.java,v 1.17 2004/02/18 22:59:50 ggregory Exp $
|
||||
* @version $Id$
|
||||
*/
|
||||
public final class CharRange implements Serializable {
|
||||
|
||||
|
|
|
@ -33,7 +33,7 @@
|
|||
* @author Pete Gieser
|
||||
* @author Gary Gregory
|
||||
* @since 1.0
|
||||
* @version $Id: CharSet.java,v 1.22 2004/02/18 22:59:49 ggregory Exp $
|
||||
* @version $Id$
|
||||
*/
|
||||
public class CharSet implements Serializable {
|
||||
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
*
|
||||
* @author Stephen Colebourne
|
||||
* @since 2.1
|
||||
* @version $Id: CharUtils.java,v 1.10 2004/09/05 20:38:36 bayard Exp $
|
||||
* @version $Id$
|
||||
*/
|
||||
public class CharUtils {
|
||||
|
||||
|
|
|
@ -31,7 +31,7 @@
|
|||
* @author <a href="mailto:alex@purpletech.com">Alexander Day Chaffee</a>
|
||||
* @author <a href="mailto:ggregory@seagullsw.com">Gary Gregory</a>
|
||||
* @since 2.0
|
||||
* @version $Id: Entities.java,v 1.19 2004/10/16 18:52:21 scolebourne Exp $
|
||||
* @version $Id$
|
||||
*/
|
||||
class Entities {
|
||||
|
||||
|
|
|
@ -39,7 +39,7 @@
|
|||
* @author Gary Gregory
|
||||
* @author Stephen Colebourne
|
||||
* @since 2.0
|
||||
* @version $Id: IllegalClassException.java,v 1.7 2004/10/15 20:55:01 scolebourne Exp $
|
||||
* @version $Id$
|
||||
*/
|
||||
public class IllegalClassException extends IllegalArgumentException {
|
||||
|
||||
|
|
|
@ -42,7 +42,7 @@
|
|||
*
|
||||
* @author Matthew Hawthorne
|
||||
* @since 2.0
|
||||
* @version $Id: IncompleteArgumentException.java,v 1.7 2004/10/15 20:55:01 scolebourne Exp $
|
||||
* @version $Id$
|
||||
*/
|
||||
public class IncompleteArgumentException extends IllegalArgumentException {
|
||||
|
||||
|
|
|
@ -31,7 +31,7 @@
|
|||
* @author Alex Chaffee (alex@apache.org)
|
||||
* @author Stephen Colebourne
|
||||
* @since 2.0
|
||||
* @version $Revision: 1.6 $
|
||||
* @version $Revision$
|
||||
* @see java.util.HashMap
|
||||
*/
|
||||
class IntHashMap {
|
||||
|
|
|
@ -46,7 +46,7 @@
|
|||
* @author Matthew Hawthorne
|
||||
* @author Stephen Colebourne
|
||||
* @since 2.0
|
||||
* @version $Id: NotImplementedException.java,v 1.10 2004/10/21 01:18:33 ggregory Exp $
|
||||
* @version $Id$
|
||||
*/
|
||||
public class NotImplementedException
|
||||
extends UnsupportedOperationException implements Nestable {
|
||||
|
|
|
@ -40,7 +40,7 @@
|
|||
* @author Matthew Hawthorne
|
||||
* @author Stephen Colebourne
|
||||
* @since 2.0
|
||||
* @version $Id: NullArgumentException.java,v 1.8 2004/10/15 20:55:01 scolebourne Exp $
|
||||
* @version $Id$
|
||||
*/
|
||||
public class NullArgumentException extends IllegalArgumentException {
|
||||
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
* @author <a href="mailto:chrise@esha.com">Christopher Elkins</a>
|
||||
* @author Stephen Colebourne
|
||||
* @since 1.0
|
||||
* @version $Revision: 1.11 $ $Date: 2004/02/18 22:59:49 $
|
||||
* @version $Revision$ $Date$
|
||||
*
|
||||
* @deprecated Use one of the Range classes in org.apache.commons.lang.math.
|
||||
* Class will be removed in Commons Lang 3.0.
|
||||
|
|
|
@ -28,7 +28,7 @@
|
|||
* @author Eric Pugh
|
||||
* @author Phil Steitz
|
||||
* @since 1.0
|
||||
* @version $Id: NumberUtils.java,v 1.17 2004/02/19 21:04:03 fredrik Exp $
|
||||
* @version $Id$
|
||||
*
|
||||
* @deprecated Moved to org.apache.commons.lang.math.
|
||||
* Class will be removed in Commons Lang 3.0.
|
||||
|
|
|
@ -31,7 +31,7 @@
|
|||
* @author Gary Gregory
|
||||
* @author Mario Winterer
|
||||
* @since 1.0
|
||||
* @version $Id: ObjectUtils.java,v 1.24 2004/06/01 21:08:48 scolebourne Exp $
|
||||
* @version $Id$
|
||||
*/
|
||||
public class ObjectUtils {
|
||||
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
* @author Gary Gregory
|
||||
* @author Phil Steitz
|
||||
* @since 1.0
|
||||
* @version $Id: RandomStringUtils.java,v 1.27 2004/02/18 22:59:49 ggregory Exp $
|
||||
* @version $Id$
|
||||
*/
|
||||
public class RandomStringUtils {
|
||||
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
*
|
||||
* @author Stephen Colebourne
|
||||
* @since 1.0
|
||||
* @version $Id: SerializationException.java,v 1.7 2004/02/18 22:59:50 ggregory Exp $
|
||||
* @version $Id$
|
||||
*/
|
||||
public class SerializationException extends NestableRuntimeException {
|
||||
|
||||
|
|
|
@ -44,7 +44,7 @@
|
|||
* @author Jeff Varszegi
|
||||
* @author Gary Gregory
|
||||
* @since 1.0
|
||||
* @version $Id: SerializationUtils.java,v 1.13 2004/02/18 22:59:50 ggregory Exp $
|
||||
* @version $Id$
|
||||
*/
|
||||
public class SerializationUtils {
|
||||
|
||||
|
|
|
@ -36,7 +36,7 @@
|
|||
* @author Phil Steitz
|
||||
* @author Pete Gieser
|
||||
* @since 2.0
|
||||
* @version $Id: StringEscapeUtils.java,v 1.30 2004/10/07 22:45:27 scolebourne Exp $
|
||||
* @version $Id$
|
||||
*/
|
||||
public class StringEscapeUtils {
|
||||
|
||||
|
|
|
@ -111,7 +111,7 @@
|
|||
* @author Al Chou
|
||||
* @author Michael Davey
|
||||
* @since 1.0
|
||||
* @version $Id: StringUtils.java,v 1.137 2004/12/18 02:48:01 bayard Exp $
|
||||
* @version $Id$
|
||||
*/
|
||||
public class StringUtils {
|
||||
// Performance testing notes (JDK 1.4, Jul03, scolebourne)
|
||||
|
|
|
@ -34,7 +34,7 @@
|
|||
* @author Rafal Krupinski
|
||||
* @author Jason Gritman
|
||||
* @since 1.0
|
||||
* @version $Id: SystemUtils.java,v 1.38 2004/11/12 00:48:41 scolebourne Exp $
|
||||
* @version $Id$
|
||||
*/
|
||||
public class SystemUtils {
|
||||
|
||||
|
|
|
@ -39,7 +39,7 @@
|
|||
*
|
||||
* @author Matthew Hawthorne
|
||||
* @since 2.0
|
||||
* @version $Id: UnhandledException.java,v 1.6 2004/10/15 20:55:01 scolebourne Exp $
|
||||
* @version $Id$
|
||||
*/
|
||||
public class UnhandledException extends NestableRuntimeException {
|
||||
|
||||
|
|
|
@ -85,7 +85,7 @@
|
|||
* @author Gary Gregory
|
||||
* @author Pete Gieser
|
||||
* @since 1.0
|
||||
* @version $Id: CompareToBuilder.java,v 1.26 2004/07/01 17:52:07 ggregory Exp $
|
||||
* @version $Id$
|
||||
*/
|
||||
public class CompareToBuilder {
|
||||
|
||||
|
|
|
@ -77,7 +77,7 @@
|
|||
* @author Pete Gieser
|
||||
* @author Arun Mammen Thomas
|
||||
* @since 1.0
|
||||
* @version $Id: EqualsBuilder.java,v 1.28 2004/10/16 17:27:11 scolebourne Exp $
|
||||
* @version $Id$
|
||||
*/
|
||||
public class EqualsBuilder {
|
||||
|
||||
|
|
|
@ -74,7 +74,7 @@
|
|||
* @author Gary Gregory
|
||||
* @author Pete Gieser
|
||||
* @since 1.0
|
||||
* @version $Id: HashCodeBuilder.java,v 1.24 2004/11/23 19:15:28 ggregory Exp $
|
||||
* @version $Id$
|
||||
*/
|
||||
public class HashCodeBuilder {
|
||||
|
||||
|
|
|
@ -28,7 +28,7 @@
|
|||
* @author Pete Gieser
|
||||
* @author Gary Gregory
|
||||
* @since 1.0
|
||||
* @version $Id: StandardToStringStyle.java,v 1.17 2004/02/18 22:53:24 ggregory Exp $
|
||||
* @version $Id$
|
||||
*/
|
||||
public class StandardToStringStyle extends ToStringStyle {
|
||||
|
||||
|
|
|
@ -87,7 +87,7 @@
|
|||
* @author Gary Gregory
|
||||
* @author Pete Gieser
|
||||
* @since 1.0
|
||||
* @version $Id: ToStringBuilder.java,v 1.35 2004/07/01 17:40:10 ggregory Exp $
|
||||
* @version $Id$
|
||||
*/
|
||||
public class ToStringBuilder {
|
||||
|
||||
|
|
|
@ -63,7 +63,7 @@
|
|||
* @author Pete Gieser
|
||||
* @author Masato Tezuka
|
||||
* @since 1.0
|
||||
* @version $Id: ToStringStyle.java,v 1.36 2004/12/28 23:13:03 scolebourne Exp $
|
||||
* @version $Id$
|
||||
*/
|
||||
public abstract class ToStringStyle implements Serializable {
|
||||
|
||||
|
|
|
@ -233,7 +233,7 @@
|
|||
* @author Chris Webb
|
||||
* @author Mike Bowler
|
||||
* @since 1.0
|
||||
* @version $Id: Enum.java,v 1.30 2004/12/12 22:36:20 ggregory Exp $
|
||||
* @version $Id$
|
||||
*/
|
||||
public abstract class Enum implements Comparable, Serializable {
|
||||
|
||||
|
|
|
@ -31,7 +31,7 @@
|
|||
* @author Stephen Colebourne
|
||||
* @author Gary Gregory
|
||||
* @since 1.0
|
||||
* @version $Id: EnumUtils.java,v 1.13 2004/09/30 17:24:47 ggregory Exp $
|
||||
* @version $Id$
|
||||
*/
|
||||
public class EnumUtils {
|
||||
|
||||
|
|
|
@ -99,7 +99,7 @@
|
|||
* @author Apache Avalon project
|
||||
* @author Stephen Colebourne
|
||||
* @since 1.0
|
||||
* @version $Id: ValuedEnum.java,v 1.17 2004/09/30 17:24:47 ggregory Exp $
|
||||
* @version $Id$
|
||||
*/
|
||||
public abstract class ValuedEnum extends Enum {
|
||||
|
||||
|
|
|
@ -230,7 +230,7 @@
|
|||
* @author Mike Bowler
|
||||
* @author Matthias Eichel
|
||||
* @since 2.1 (class existed in enum package from v1.0)
|
||||
* @version $Id: Enum.java,v 1.4 2004/12/12 22:36:20 ggregory Exp $
|
||||
* @version $Id$
|
||||
*/
|
||||
public abstract class Enum implements Comparable, Serializable {
|
||||
|
||||
|
|
|
@ -27,7 +27,7 @@
|
|||
* @author Stephen Colebourne
|
||||
* @author Gary Gregory
|
||||
* @since 2.1 (class existed in enum package from v1.0)
|
||||
* @version $Id: EnumUtils.java,v 1.2 2004/06/01 20:56:44 scolebourne Exp $
|
||||
* @version $Id$
|
||||
*/
|
||||
public class EnumUtils {
|
||||
|
||||
|
|
|
@ -98,7 +98,7 @@
|
|||
* @author Apache Avalon project
|
||||
* @author Stephen Colebourne
|
||||
* @since 2.1 (class existed in enum package from v1.0)
|
||||
* @version $Id: ValuedEnum.java,v 1.4 2004/10/15 00:43:29 ggregory Exp $
|
||||
* @version $Id$
|
||||
*/
|
||||
public abstract class ValuedEnum extends Enum {
|
||||
|
||||
|
|
|
@ -28,7 +28,7 @@
|
|||
* @author <a href="mailto:steven@caswell.name">Steven Caswell</a>
|
||||
* @author Pete Gieser
|
||||
* @since 1.0
|
||||
* @version $Id: Nestable.java,v 1.12 2004/10/09 10:45:24 scolebourne Exp $
|
||||
* @version $Id$
|
||||
*/
|
||||
public interface Nestable {
|
||||
|
||||
|
|
|
@ -41,7 +41,7 @@
|
|||
* @author Sean C. Sullivan
|
||||
* @author Stephen Colebourne
|
||||
* @since 1.0
|
||||
* @version $Id: NestableDelegate.java,v 1.26 2004/10/09 10:45:24 scolebourne Exp $
|
||||
* @version $Id$
|
||||
*/
|
||||
public class NestableDelegate implements Serializable {
|
||||
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
*
|
||||
* @author Stephen Colebourne
|
||||
* @since 2.0
|
||||
* @version $Id: DoubleRange.java,v 1.6 2004/02/18 22:56:13 ggregory Exp $
|
||||
* @version $Id$
|
||||
*/
|
||||
public final class DoubleRange extends Range implements Serializable {
|
||||
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
*
|
||||
* @author Stephen Colebourne
|
||||
* @since 2.0
|
||||
* @version $Id: FloatRange.java,v 1.6 2004/02/18 22:56:13 ggregory Exp $
|
||||
* @version $Id$
|
||||
*/
|
||||
public final class FloatRange extends Range implements Serializable {
|
||||
|
||||
|
|
|
@ -31,7 +31,7 @@
|
|||
* @author Pete Gieser
|
||||
* @author C. Scott Ananian
|
||||
* @since 2.0
|
||||
* @version $Id: Fraction.java,v 1.14 2004/07/11 23:20:17 psteitz Exp $
|
||||
* @version $Id$
|
||||
*/
|
||||
public final class Fraction extends Number implements Serializable, Comparable {
|
||||
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
*
|
||||
* @author Stephen Colebourne
|
||||
* @since 2.0
|
||||
* @version $Id: IntRange.java,v 1.7 2004/02/18 22:56:13 ggregory Exp $
|
||||
* @version $Id$
|
||||
*/
|
||||
public final class IntRange extends Range implements Serializable {
|
||||
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
*
|
||||
* @author Henri Yandell
|
||||
* @since 2.0
|
||||
* @version $Id: JVMRandom.java,v 1.11 2004/10/21 01:18:33 ggregory Exp $
|
||||
* @version $Id$
|
||||
*/
|
||||
public final class JVMRandom extends Random {
|
||||
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
*
|
||||
* @author Stephen Colebourne
|
||||
* @since 2.0
|
||||
* @version $Id: LongRange.java,v 1.8 2004/10/21 01:18:33 ggregory Exp $
|
||||
* @version $Id$
|
||||
*/
|
||||
public final class LongRange extends Range implements Serializable {
|
||||
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
* @author <a href="mailto:chrise@esha.com">Christopher Elkins</a>
|
||||
* @author Stephen Colebourne
|
||||
* @since 2.0 (previously in org.apache.commons.lang)
|
||||
* @version $Id: NumberRange.java,v 1.7 2004/02/18 22:56:13 ggregory Exp $
|
||||
* @version $Id$
|
||||
*/
|
||||
public final class NumberRange extends Range implements Serializable {
|
||||
|
||||
|
|
|
@ -33,7 +33,7 @@
|
|||
* @author <a href="mailto:ggregory@seagullsw.com">Gary Gregory</a>
|
||||
* @author <a href="mailto:fredrik@westermarck.com">Fredrik Westermarck</a>
|
||||
* @since 2.0
|
||||
* @version $Id: NumberUtils.java,v 1.19 2004/10/08 00:07:59 scolebourne Exp $
|
||||
* @version $Id$
|
||||
*/
|
||||
public class NumberUtils {
|
||||
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
* @author Henri Yandell
|
||||
* @author Gary D. Gregory
|
||||
* @since 2.0
|
||||
* @version $Id: RandomUtils.java,v 1.8 2004/02/18 22:56:13 ggregory Exp $
|
||||
* @version $Id$
|
||||
*/
|
||||
public class RandomUtils {
|
||||
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
*
|
||||
* @author Stephen Colebourne
|
||||
* @since 2.0
|
||||
* @version $Id: Range.java,v 1.6 2004/02/18 22:56:13 ggregory Exp $
|
||||
* @version $Id$
|
||||
*/
|
||||
public abstract class Range {
|
||||
|
||||
|
|
|
@ -27,7 +27,7 @@
|
|||
*
|
||||
* @author Matthew Hawthorne
|
||||
* @since 2.1
|
||||
* @version $Id: Mutable.java,v 1.3 2004/10/08 19:45:46 ggregory Exp $
|
||||
* @version $Id$
|
||||
*/
|
||||
public interface Mutable {
|
||||
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
* A mutable <code>Object</code> wrapper.
|
||||
*
|
||||
* @since 2.1
|
||||
* @version $Id: MutableObject.java,v 1.5 2004/10/08 22:29:33 ggregory Exp $
|
||||
* @version $Id$
|
||||
*/
|
||||
public class MutableObject implements Mutable, Serializable {
|
||||
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
* @author Ken Fitzpatrick
|
||||
* @author Henri Yandell
|
||||
* @since 2.1
|
||||
* @version $Id: Interpolation.java,v 1.1 2004/09/05 00:56:31 bayard Exp $
|
||||
* @version $Id$
|
||||
*/
|
||||
public class Interpolation {
|
||||
|
||||
|
|
|
@ -50,7 +50,7 @@
|
|||
*
|
||||
* @author Stephen Colebourne
|
||||
* @since 2.1
|
||||
* @version $Id: StrBuilder.java,v 1.1 2004/10/16 15:09:52 scolebourne Exp $
|
||||
* @version $Id$
|
||||
*/
|
||||
public class StrBuilder implements Cloneable {
|
||||
|
||||
|
|
|
@ -31,7 +31,7 @@
|
|||
* @author Stephen Colebourne
|
||||
* @author <a href="mailto:ggregory@seagullsw.com">Gary Gregory</a>
|
||||
* @since 2.0
|
||||
* @version $Id: DateFormatUtils.java,v 1.9 2004/02/18 22:56:42 ggregory Exp $
|
||||
* @version $Id$
|
||||
*/
|
||||
public class DateFormatUtils {
|
||||
|
||||
|
|
|
@ -61,7 +61,7 @@
|
|||
* @author Stephen Colebourne
|
||||
* @author Nikolay Metchev
|
||||
* @since 2.0
|
||||
* @version $Id: FastDateFormat.java,v 1.22 2004/10/08 00:09:01 scolebourne Exp $
|
||||
* @version $Id$
|
||||
*/
|
||||
public class FastDateFormat extends Format {
|
||||
// A lot of the speed in this class comes from caching, but some comes
|
||||
|
|
|
@ -46,7 +46,7 @@
|
|||
* @author Henri Yandell
|
||||
* @author Stephen Colebourne
|
||||
* @since 2.0
|
||||
* @version $Id: StopWatch.java,v 1.11 2004/10/15 23:11:31 scolebourne Exp $
|
||||
* @version $Id$
|
||||
*/
|
||||
public class StopWatch {
|
||||
|
||||
|
|
|
@ -32,7 +32,7 @@
|
|||
* Test suite for [lang].
|
||||
*
|
||||
* @author Stephen Colebourne
|
||||
* @version $Id: AllLangTestSuite.java,v 1.8 2004/09/05 01:42:37 bayard Exp $
|
||||
* @version $Id$
|
||||
*/
|
||||
public class AllLangTestSuite extends TestCase {
|
||||
|
||||
|
|
|
@ -27,7 +27,7 @@
|
|||
* Tests ArrayUtils add methods.
|
||||
*
|
||||
* @author Gary D. Gregory
|
||||
* @version $Id: ArrayUtilsAddTest.java,v 1.6 2005/01/27 06:43:20 bayard Exp $
|
||||
* @version $Id$
|
||||
*/
|
||||
public class ArrayUtilsAddTest extends TestCase {
|
||||
public static void main(String[] args) {
|
||||
|
|
|
@ -1,457 +1,457 @@
|
|||
/*
|
||||
* Copyright 2002-2004 The Apache Software Foundation.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.apache.commons.lang;
|
||||
|
||||
import java.util.Arrays;
|
||||
|
||||
import junit.framework.Test;
|
||||
import junit.framework.TestCase;
|
||||
import junit.framework.TestSuite;
|
||||
import junit.textui.TestRunner;
|
||||
|
||||
/**
|
||||
* Tests ArrayUtils remove and removeElement methods.
|
||||
*
|
||||
* @author Maarten Coene
|
||||
* @version $Id: ArrayUtilsRemoveTest.java,v 1.1 2004/06/06 03:53:24 bayard Exp $
|
||||
*/
|
||||
public class ArrayUtilsRemoveTest extends TestCase {
|
||||
public static void main(String[] args) {
|
||||
TestRunner.run(suite());
|
||||
}
|
||||
|
||||
public static Test suite() {
|
||||
TestSuite suite = new TestSuite(ArrayUtilsRemoveTest.class);
|
||||
suite.setName("ArrayUtils remove Tests");
|
||||
return suite;
|
||||
}
|
||||
|
||||
public void testRemoveObjectArray() {
|
||||
Object[] array;
|
||||
array = ArrayUtils.remove(new Object[] {"a"}, 0);
|
||||
assertTrue(Arrays.equals(ArrayUtils.EMPTY_OBJECT_ARRAY, array));
|
||||
assertEquals(Object.class, array.getClass().getComponentType());
|
||||
array = ArrayUtils.remove(new Object[] {"a", "b"}, 0);
|
||||
assertTrue(Arrays.equals(new Object[] {"b"}, array));
|
||||
assertEquals(Object.class, array.getClass().getComponentType());
|
||||
array = ArrayUtils.remove(new Object[] {"a", "b"}, 1);
|
||||
assertTrue(Arrays.equals(new Object[] {"a"}, array));
|
||||
assertEquals(Object.class, array.getClass().getComponentType());
|
||||
array = ArrayUtils.remove(new Object[] {"a", "b", "c"}, 1);
|
||||
assertTrue(Arrays.equals(new Object[] {"a", "c"}, array));
|
||||
assertEquals(Object.class, array.getClass().getComponentType());
|
||||
try {
|
||||
ArrayUtils.remove(new Object[] {"a", "b"}, -1);
|
||||
fail("IndexOutOfBoundsException expected");
|
||||
} catch (IndexOutOfBoundsException e) {}
|
||||
try {
|
||||
ArrayUtils.remove(new Object[] {"a", "b"}, 2);
|
||||
fail("IndexOutOfBoundsException expected");
|
||||
} catch (IndexOutOfBoundsException e) {}
|
||||
try {
|
||||
ArrayUtils.remove((Object[]) null, 0);
|
||||
fail("IndexOutOfBoundsException expected");
|
||||
} catch (IndexOutOfBoundsException e) {}
|
||||
}
|
||||
|
||||
public void testRemoveBooleanArray() {
|
||||
boolean[] array;
|
||||
array = ArrayUtils.remove(new boolean[] {true}, 0);
|
||||
assertTrue(Arrays.equals(ArrayUtils.EMPTY_BOOLEAN_ARRAY, array));
|
||||
assertEquals(Boolean.TYPE, array.getClass().getComponentType());
|
||||
array = ArrayUtils.remove(new boolean[] {true, false}, 0);
|
||||
assertTrue(Arrays.equals(new boolean[] {false}, array));
|
||||
assertEquals(Boolean.TYPE, array.getClass().getComponentType());
|
||||
array = ArrayUtils.remove(new boolean[] {true, false}, 1);
|
||||
assertTrue(Arrays.equals(new boolean[] {true}, array));
|
||||
assertEquals(Boolean.TYPE, array.getClass().getComponentType());
|
||||
array = ArrayUtils.remove(new boolean[] {true, false, true}, 1);
|
||||
assertTrue(Arrays.equals(new boolean[] {true, true}, array));
|
||||
assertEquals(Boolean.TYPE, array.getClass().getComponentType());
|
||||
try {
|
||||
ArrayUtils.remove(new boolean[] {true, false}, -1);
|
||||
fail("IndexOutOfBoundsException expected");
|
||||
} catch (IndexOutOfBoundsException e) {}
|
||||
try {
|
||||
ArrayUtils.remove(new boolean[] {true, false}, 2);
|
||||
fail("IndexOutOfBoundsException expected");
|
||||
} catch (IndexOutOfBoundsException e) {}
|
||||
try {
|
||||
ArrayUtils.remove((boolean[]) null, 0);
|
||||
fail("IndexOutOfBoundsException expected");
|
||||
} catch (IndexOutOfBoundsException e) {}
|
||||
}
|
||||
|
||||
public void testRemoveByteArray() {
|
||||
byte[] array;
|
||||
array = ArrayUtils.remove(new byte[] {1}, 0);
|
||||
assertTrue(Arrays.equals(ArrayUtils.EMPTY_BYTE_ARRAY, array));
|
||||
assertEquals(Byte.TYPE, array.getClass().getComponentType());
|
||||
array = ArrayUtils.remove(new byte[] {1, 2}, 0);
|
||||
assertTrue(Arrays.equals(new byte[] {2}, array));
|
||||
assertEquals(Byte.TYPE, array.getClass().getComponentType());
|
||||
array = ArrayUtils.remove(new byte[] {1, 2}, 1);
|
||||
assertTrue(Arrays.equals(new byte[] {1}, array));
|
||||
assertEquals(Byte.TYPE, array.getClass().getComponentType());
|
||||
array = ArrayUtils.remove(new byte[] {1, 2, 1}, 1);
|
||||
assertTrue(Arrays.equals(new byte[] {1, 1}, array));
|
||||
assertEquals(Byte.TYPE, array.getClass().getComponentType());
|
||||
try {
|
||||
ArrayUtils.remove(new byte[] {1, 2}, -1);
|
||||
fail("IndexOutOfBoundsException expected");
|
||||
} catch (IndexOutOfBoundsException e) {}
|
||||
try {
|
||||
ArrayUtils.remove(new byte[] {1, 2}, 2);
|
||||
fail("IndexOutOfBoundsException expected");
|
||||
} catch (IndexOutOfBoundsException e) {}
|
||||
try {
|
||||
ArrayUtils.remove((byte[]) null, 0);
|
||||
fail("IndexOutOfBoundsException expected");
|
||||
} catch (IndexOutOfBoundsException e) {}
|
||||
}
|
||||
|
||||
public void testRemoveCharArray() {
|
||||
char[] array;
|
||||
array = ArrayUtils.remove(new char[] {'a'}, 0);
|
||||
assertTrue(Arrays.equals(ArrayUtils.EMPTY_CHAR_ARRAY, array));
|
||||
assertEquals(Character.TYPE, array.getClass().getComponentType());
|
||||
array = ArrayUtils.remove(new char[] {'a', 'b'}, 0);
|
||||
assertTrue(Arrays.equals(new char[] {'b'}, array));
|
||||
assertEquals(Character.TYPE, array.getClass().getComponentType());
|
||||
array = ArrayUtils.remove(new char[] {'a', 'b'}, 1);
|
||||
assertTrue(Arrays.equals(new char[] {'a'}, array));
|
||||
assertEquals(Character.TYPE, array.getClass().getComponentType());
|
||||
array = ArrayUtils.remove(new char[] {'a', 'b', 'c'}, 1);
|
||||
assertTrue(Arrays.equals(new char[] {'a', 'c'}, array));
|
||||
assertEquals(Character.TYPE, array.getClass().getComponentType());
|
||||
try {
|
||||
ArrayUtils.remove(new char[] {'a', 'b'}, -1);
|
||||
fail("IndexOutOfBoundsException expected");
|
||||
} catch (IndexOutOfBoundsException e) {}
|
||||
try {
|
||||
ArrayUtils.remove(new char[] {'a', 'b'}, 2);
|
||||
fail("IndexOutOfBoundsException expected");
|
||||
} catch (IndexOutOfBoundsException e) {}
|
||||
try {
|
||||
ArrayUtils.remove((char[]) null, 0);
|
||||
fail("IndexOutOfBoundsException expected");
|
||||
} catch (IndexOutOfBoundsException e) {}
|
||||
}
|
||||
|
||||
public void testRemoveDoubleArray() {
|
||||
double[] array;
|
||||
array = ArrayUtils.remove(new double[] {1}, 0);
|
||||
assertTrue(Arrays.equals(ArrayUtils.EMPTY_DOUBLE_ARRAY, array));
|
||||
assertEquals(Double.TYPE, array.getClass().getComponentType());
|
||||
array = ArrayUtils.remove(new double[] {1, 2}, 0);
|
||||
assertTrue(Arrays.equals(new double[] {2}, array));
|
||||
assertEquals(Double.TYPE, array.getClass().getComponentType());
|
||||
array = ArrayUtils.remove(new double[] {1, 2}, 1);
|
||||
assertTrue(Arrays.equals(new double[] {1}, array));
|
||||
assertEquals(Double.TYPE, array.getClass().getComponentType());
|
||||
array = ArrayUtils.remove(new double[] {1, 2, 1}, 1);
|
||||
assertTrue(Arrays.equals(new double[] {1, 1}, array));
|
||||
assertEquals(Double.TYPE, array.getClass().getComponentType());
|
||||
try {
|
||||
ArrayUtils.remove(new double[] {1, 2}, -1);
|
||||
fail("IndexOutOfBoundsException expected");
|
||||
} catch (IndexOutOfBoundsException e) {}
|
||||
try {
|
||||
ArrayUtils.remove(new double[] {1, 2}, 2);
|
||||
fail("IndexOutOfBoundsException expected");
|
||||
} catch (IndexOutOfBoundsException e) {}
|
||||
try {
|
||||
ArrayUtils.remove((double[]) null, 0);
|
||||
fail("IndexOutOfBoundsException expected");
|
||||
} catch (IndexOutOfBoundsException e) {}
|
||||
}
|
||||
|
||||
public void testRemoveFloatArray() {
|
||||
float[] array;
|
||||
array = ArrayUtils.remove(new float[] {1}, 0);
|
||||
assertTrue(Arrays.equals(ArrayUtils.EMPTY_FLOAT_ARRAY, array));
|
||||
assertEquals(Float.TYPE, array.getClass().getComponentType());
|
||||
array = ArrayUtils.remove(new float[] {1, 2}, 0);
|
||||
assertTrue(Arrays.equals(new float[] {2}, array));
|
||||
assertEquals(Float.TYPE, array.getClass().getComponentType());
|
||||
array = ArrayUtils.remove(new float[] {1, 2}, 1);
|
||||
assertTrue(Arrays.equals(new float[] {1}, array));
|
||||
assertEquals(Float.TYPE, array.getClass().getComponentType());
|
||||
array = ArrayUtils.remove(new float[] {1, 2, 1}, 1);
|
||||
assertTrue(Arrays.equals(new float[] {1, 1}, array));
|
||||
assertEquals(Float.TYPE, array.getClass().getComponentType());
|
||||
try {
|
||||
ArrayUtils.remove(new float[] {1, 2}, -1);
|
||||
fail("IndexOutOfBoundsException expected");
|
||||
} catch (IndexOutOfBoundsException e) {}
|
||||
try {
|
||||
ArrayUtils.remove(new float[] {1, 2}, 2);
|
||||
fail("IndexOutOfBoundsException expected");
|
||||
} catch (IndexOutOfBoundsException e) {}
|
||||
try {
|
||||
ArrayUtils.remove((float[]) null, 0);
|
||||
fail("IndexOutOfBoundsException expected");
|
||||
} catch (IndexOutOfBoundsException e) {}
|
||||
}
|
||||
|
||||
public void testRemoveIntArray() {
|
||||
int[] array;
|
||||
array = ArrayUtils.remove(new int[] {1}, 0);
|
||||
assertTrue(Arrays.equals(ArrayUtils.EMPTY_INT_ARRAY, array));
|
||||
assertEquals(Integer.TYPE, array.getClass().getComponentType());
|
||||
array = ArrayUtils.remove(new int[] {1, 2}, 0);
|
||||
assertTrue(Arrays.equals(new int[] {2}, array));
|
||||
assertEquals(Integer.TYPE, array.getClass().getComponentType());
|
||||
array = ArrayUtils.remove(new int[] {1, 2}, 1);
|
||||
assertTrue(Arrays.equals(new int[] {1}, array));
|
||||
assertEquals(Integer.TYPE, array.getClass().getComponentType());
|
||||
array = ArrayUtils.remove(new int[] {1, 2, 1}, 1);
|
||||
assertTrue(Arrays.equals(new int[] {1, 1}, array));
|
||||
assertEquals(Integer.TYPE, array.getClass().getComponentType());
|
||||
try {
|
||||
ArrayUtils.remove(new int[] {1, 2}, -1);
|
||||
fail("IndexOutOfBoundsException expected");
|
||||
} catch (IndexOutOfBoundsException e) {}
|
||||
try {
|
||||
ArrayUtils.remove(new int[] {1, 2}, 2);
|
||||
fail("IndexOutOfBoundsException expected");
|
||||
} catch (IndexOutOfBoundsException e) {}
|
||||
try {
|
||||
ArrayUtils.remove((int[]) null, 0);
|
||||
fail("IndexOutOfBoundsException expected");
|
||||
} catch (IndexOutOfBoundsException e) {}
|
||||
}
|
||||
|
||||
public void testRemoveLongArray() {
|
||||
long[] array;
|
||||
array = ArrayUtils.remove(new long[] {1}, 0);
|
||||
assertTrue(Arrays.equals(ArrayUtils.EMPTY_LONG_ARRAY, array));
|
||||
assertEquals(Long.TYPE, array.getClass().getComponentType());
|
||||
array = ArrayUtils.remove(new long[] {1, 2}, 0);
|
||||
assertTrue(Arrays.equals(new long[] {2}, array));
|
||||
assertEquals(Long.TYPE, array.getClass().getComponentType());
|
||||
array = ArrayUtils.remove(new long[] {1, 2}, 1);
|
||||
assertTrue(Arrays.equals(new long[] {1}, array));
|
||||
assertEquals(Long.TYPE, array.getClass().getComponentType());
|
||||
array = ArrayUtils.remove(new long[] {1, 2, 1}, 1);
|
||||
assertTrue(Arrays.equals(new long[] {1, 1}, array));
|
||||
assertEquals(Long.TYPE, array.getClass().getComponentType());
|
||||
try {
|
||||
ArrayUtils.remove(new long[] {1, 2}, -1);
|
||||
fail("IndexOutOfBoundsException expected");
|
||||
} catch (IndexOutOfBoundsException e) {}
|
||||
try {
|
||||
ArrayUtils.remove(new long[] {1, 2}, 2);
|
||||
fail("IndexOutOfBoundsException expected");
|
||||
} catch (IndexOutOfBoundsException e) {}
|
||||
try {
|
||||
ArrayUtils.remove((long[]) null, 0);
|
||||
fail("IndexOutOfBoundsException expected");
|
||||
} catch (IndexOutOfBoundsException e) {}
|
||||
}
|
||||
|
||||
public void testRemoveShortArray() {
|
||||
short[] array;
|
||||
array = ArrayUtils.remove(new short[] {1}, 0);
|
||||
assertTrue(Arrays.equals(ArrayUtils.EMPTY_SHORT_ARRAY, array));
|
||||
assertEquals(Short.TYPE, array.getClass().getComponentType());
|
||||
array = ArrayUtils.remove(new short[] {1, 2}, 0);
|
||||
assertTrue(Arrays.equals(new short[] {2}, array));
|
||||
assertEquals(Short.TYPE, array.getClass().getComponentType());
|
||||
array = ArrayUtils.remove(new short[] {1, 2}, 1);
|
||||
assertTrue(Arrays.equals(new short[] {1}, array));
|
||||
assertEquals(Short.TYPE, array.getClass().getComponentType());
|
||||
array = ArrayUtils.remove(new short[] {1, 2, 1}, 1);
|
||||
assertTrue(Arrays.equals(new short[] {1, 1}, array));
|
||||
assertEquals(Short.TYPE, array.getClass().getComponentType());
|
||||
try {
|
||||
ArrayUtils.remove(new short[] {1, 2}, -1);
|
||||
fail("IndexOutOfBoundsException expected");
|
||||
} catch (IndexOutOfBoundsException e) {}
|
||||
try {
|
||||
ArrayUtils.remove(new short[] {1, 2}, 2);
|
||||
fail("IndexOutOfBoundsException expected");
|
||||
} catch (IndexOutOfBoundsException e) {}
|
||||
try {
|
||||
ArrayUtils.remove((short[]) null, 0);
|
||||
fail("IndexOutOfBoundsException expected");
|
||||
} catch (IndexOutOfBoundsException e) {}
|
||||
}
|
||||
|
||||
public void testRemoveElementObjectArray() {
|
||||
Object[] array;
|
||||
array = ArrayUtils.removeElement((Object[]) null, "a");
|
||||
assertNull(array);
|
||||
array = ArrayUtils.removeElement(ArrayUtils.EMPTY_OBJECT_ARRAY, "a");
|
||||
assertTrue(Arrays.equals(ArrayUtils.EMPTY_OBJECT_ARRAY, array));
|
||||
assertEquals(Object.class, array.getClass().getComponentType());
|
||||
array = ArrayUtils.removeElement(new Object[] {"a"}, "a");
|
||||
assertTrue(Arrays.equals(ArrayUtils.EMPTY_OBJECT_ARRAY, array));
|
||||
assertEquals(Object.class, array.getClass().getComponentType());
|
||||
array = ArrayUtils.removeElement(new Object[] {"a", "b"}, "a");
|
||||
assertTrue(Arrays.equals(new Object[] {"b"}, array));
|
||||
assertEquals(Object.class, array.getClass().getComponentType());
|
||||
array = ArrayUtils.removeElement(new Object[] {"a", "b", "a"}, "a");
|
||||
assertTrue(Arrays.equals(new Object[] {"b", "a"}, array));
|
||||
assertEquals(Object.class, array.getClass().getComponentType());
|
||||
}
|
||||
|
||||
public void testRemoveElementBooleanArray() {
|
||||
boolean[] array;
|
||||
array = ArrayUtils.removeElement((boolean[]) null, true);
|
||||
assertNull(array);
|
||||
array = ArrayUtils.removeElement(ArrayUtils.EMPTY_BOOLEAN_ARRAY, true);
|
||||
assertTrue(Arrays.equals(ArrayUtils.EMPTY_BOOLEAN_ARRAY, array));
|
||||
assertEquals(Boolean.TYPE, array.getClass().getComponentType());
|
||||
array = ArrayUtils.removeElement(new boolean[] {true}, true);
|
||||
assertTrue(Arrays.equals(ArrayUtils.EMPTY_BOOLEAN_ARRAY, array));
|
||||
assertEquals(Boolean.TYPE, array.getClass().getComponentType());
|
||||
array = ArrayUtils.removeElement(new boolean[] {true, false}, true);
|
||||
assertTrue(Arrays.equals(new boolean[] {false}, array));
|
||||
assertEquals(Boolean.TYPE, array.getClass().getComponentType());
|
||||
array = ArrayUtils.removeElement(new boolean[] {true, false, true}, true);
|
||||
assertTrue(Arrays.equals(new boolean[] {false, true}, array));
|
||||
assertEquals(Boolean.TYPE, array.getClass().getComponentType());
|
||||
}
|
||||
|
||||
public void testRemoveElementByteArray() {
|
||||
byte[] array;
|
||||
array = ArrayUtils.removeElement((byte[]) null, (byte) 1);
|
||||
assertNull(array);
|
||||
array = ArrayUtils.removeElement(ArrayUtils.EMPTY_BYTE_ARRAY, (byte) 1);
|
||||
assertTrue(Arrays.equals(ArrayUtils.EMPTY_BYTE_ARRAY, array));
|
||||
assertEquals(Byte.TYPE, array.getClass().getComponentType());
|
||||
array = ArrayUtils.removeElement(new byte[] {1}, (byte) 1);
|
||||
assertTrue(Arrays.equals(ArrayUtils.EMPTY_BYTE_ARRAY, array));
|
||||
assertEquals(Byte.TYPE, array.getClass().getComponentType());
|
||||
array = ArrayUtils.removeElement(new byte[] {1, 2}, (byte) 1);
|
||||
assertTrue(Arrays.equals(new byte[] {2}, array));
|
||||
assertEquals(Byte.TYPE, array.getClass().getComponentType());
|
||||
array = ArrayUtils.removeElement(new byte[] {1, 2, 1}, (byte) 1);
|
||||
assertTrue(Arrays.equals(new byte[] {2, 1}, array));
|
||||
assertEquals(Byte.TYPE, array.getClass().getComponentType());
|
||||
}
|
||||
|
||||
public void testRemoveElementCharArray() {
|
||||
char[] array;
|
||||
array = ArrayUtils.removeElement((char[]) null, 'a');
|
||||
assertNull(array);
|
||||
array = ArrayUtils.removeElement(ArrayUtils.EMPTY_CHAR_ARRAY, 'a');
|
||||
assertTrue(Arrays.equals(ArrayUtils.EMPTY_CHAR_ARRAY, array));
|
||||
assertEquals(Character.TYPE, array.getClass().getComponentType());
|
||||
array = ArrayUtils.removeElement(new char[] {'a'}, 'a');
|
||||
assertTrue(Arrays.equals(ArrayUtils.EMPTY_CHAR_ARRAY, array));
|
||||
assertEquals(Character.TYPE, array.getClass().getComponentType());
|
||||
array = ArrayUtils.removeElement(new char[] {'a', 'b'}, 'a');
|
||||
assertTrue(Arrays.equals(new char[] {'b'}, array));
|
||||
assertEquals(Character.TYPE, array.getClass().getComponentType());
|
||||
array = ArrayUtils.removeElement(new char[] {'a', 'b', 'a'}, 'a');
|
||||
assertTrue(Arrays.equals(new char[] {'b', 'a'}, array));
|
||||
assertEquals(Character.TYPE, array.getClass().getComponentType());
|
||||
}
|
||||
|
||||
public void testRemoveElementDoubleArray() {
|
||||
double[] array;
|
||||
array = ArrayUtils.removeElement((double[]) null, (double) 1);
|
||||
assertNull(array);
|
||||
array = ArrayUtils.removeElement(ArrayUtils.EMPTY_DOUBLE_ARRAY, (double) 1);
|
||||
assertTrue(Arrays.equals(ArrayUtils.EMPTY_DOUBLE_ARRAY, array));
|
||||
assertEquals(Double.TYPE, array.getClass().getComponentType());
|
||||
array = ArrayUtils.removeElement(new double[] {1}, (double) 1);
|
||||
assertTrue(Arrays.equals(ArrayUtils.EMPTY_DOUBLE_ARRAY, array));
|
||||
assertEquals(Double.TYPE, array.getClass().getComponentType());
|
||||
array = ArrayUtils.removeElement(new double[] {1, 2}, (double) 1);
|
||||
assertTrue(Arrays.equals(new double[] {2}, array));
|
||||
assertEquals(Double.TYPE, array.getClass().getComponentType());
|
||||
array = ArrayUtils.removeElement(new double[] {1, 2, 1}, (double) 1);
|
||||
assertTrue(Arrays.equals(new double[] {2, 1}, array));
|
||||
assertEquals(Double.TYPE, array.getClass().getComponentType());
|
||||
}
|
||||
|
||||
public void testRemoveElementFloatArray() {
|
||||
float[] array;
|
||||
array = ArrayUtils.removeElement((float[]) null, (float) 1);
|
||||
assertNull(array);
|
||||
array = ArrayUtils.removeElement(ArrayUtils.EMPTY_FLOAT_ARRAY, (float) 1);
|
||||
assertTrue(Arrays.equals(ArrayUtils.EMPTY_FLOAT_ARRAY, array));
|
||||
assertEquals(Float.TYPE, array.getClass().getComponentType());
|
||||
array = ArrayUtils.removeElement(new float[] {1}, (float) 1);
|
||||
assertTrue(Arrays.equals(ArrayUtils.EMPTY_FLOAT_ARRAY, array));
|
||||
assertEquals(Float.TYPE, array.getClass().getComponentType());
|
||||
array = ArrayUtils.removeElement(new float[] {1, 2}, (float) 1);
|
||||
assertTrue(Arrays.equals(new float[] {2}, array));
|
||||
assertEquals(Float.TYPE, array.getClass().getComponentType());
|
||||
array = ArrayUtils.removeElement(new float[] {1, 2, 1}, (float) 1);
|
||||
assertTrue(Arrays.equals(new float[] {2, 1}, array));
|
||||
assertEquals(Float.TYPE, array.getClass().getComponentType());
|
||||
}
|
||||
|
||||
public void testRemoveElementIntArray() {
|
||||
int[] array;
|
||||
array = ArrayUtils.removeElement((int[]) null, 1);
|
||||
assertNull(array);
|
||||
array = ArrayUtils.removeElement(ArrayUtils.EMPTY_INT_ARRAY, 1);
|
||||
assertTrue(Arrays.equals(ArrayUtils.EMPTY_INT_ARRAY, array));
|
||||
assertEquals(Integer.TYPE, array.getClass().getComponentType());
|
||||
array = ArrayUtils.removeElement(new int[] {1}, 1);
|
||||
assertTrue(Arrays.equals(ArrayUtils.EMPTY_INT_ARRAY, array));
|
||||
assertEquals(Integer.TYPE, array.getClass().getComponentType());
|
||||
array = ArrayUtils.removeElement(new int[] {1, 2}, 1);
|
||||
assertTrue(Arrays.equals(new int[] {2}, array));
|
||||
assertEquals(Integer.TYPE, array.getClass().getComponentType());
|
||||
array = ArrayUtils.removeElement(new int[] {1, 2, 1}, 1);
|
||||
assertTrue(Arrays.equals(new int[] {2, 1}, array));
|
||||
assertEquals(Integer.TYPE, array.getClass().getComponentType());
|
||||
}
|
||||
|
||||
public void testRemoveElementLongArray() {
|
||||
long[] array;
|
||||
array = ArrayUtils.removeElement((long[]) null, (long) 1);
|
||||
assertNull(array);
|
||||
array = ArrayUtils.removeElement(ArrayUtils.EMPTY_LONG_ARRAY, (long) 1);
|
||||
assertTrue(Arrays.equals(ArrayUtils.EMPTY_LONG_ARRAY, array));
|
||||
assertEquals(Long.TYPE, array.getClass().getComponentType());
|
||||
array = ArrayUtils.removeElement(new long[] {1}, (long) 1);
|
||||
assertTrue(Arrays.equals(ArrayUtils.EMPTY_LONG_ARRAY, array));
|
||||
assertEquals(Long.TYPE, array.getClass().getComponentType());
|
||||
array = ArrayUtils.removeElement(new long[] {1, 2}, (long) 1);
|
||||
assertTrue(Arrays.equals(new long[] {2}, array));
|
||||
assertEquals(Long.TYPE, array.getClass().getComponentType());
|
||||
array = ArrayUtils.removeElement(new long[] {1, 2, 1}, (long) 1);
|
||||
assertTrue(Arrays.equals(new long[] {2, 1}, array));
|
||||
assertEquals(Long.TYPE, array.getClass().getComponentType());
|
||||
}
|
||||
|
||||
public void testRemoveElementShortArray() {
|
||||
short[] array;
|
||||
array = ArrayUtils.removeElement((short[]) null, (short) 1);
|
||||
assertNull(array);
|
||||
array = ArrayUtils.removeElement(ArrayUtils.EMPTY_SHORT_ARRAY, (short) 1);
|
||||
assertTrue(Arrays.equals(ArrayUtils.EMPTY_SHORT_ARRAY, array));
|
||||
assertEquals(Short.TYPE, array.getClass().getComponentType());
|
||||
array = ArrayUtils.removeElement(new short[] {1}, (short) 1);
|
||||
assertTrue(Arrays.equals(ArrayUtils.EMPTY_SHORT_ARRAY, array));
|
||||
assertEquals(Short.TYPE, array.getClass().getComponentType());
|
||||
array = ArrayUtils.removeElement(new short[] {1, 2}, (short) 1);
|
||||
assertTrue(Arrays.equals(new short[] {2}, array));
|
||||
assertEquals(Short.TYPE, array.getClass().getComponentType());
|
||||
array = ArrayUtils.removeElement(new short[] {1, 2, 1}, (short) 1);
|
||||
assertTrue(Arrays.equals(new short[] {2, 1}, array));
|
||||
assertEquals(Short.TYPE, array.getClass().getComponentType());
|
||||
}
|
||||
|
||||
}
|
||||
/*
|
||||
* Copyright 2002-2004 The Apache Software Foundation.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.apache.commons.lang;
|
||||
|
||||
import java.util.Arrays;
|
||||
|
||||
import junit.framework.Test;
|
||||
import junit.framework.TestCase;
|
||||
import junit.framework.TestSuite;
|
||||
import junit.textui.TestRunner;
|
||||
|
||||
/**
|
||||
* Tests ArrayUtils remove and removeElement methods.
|
||||
*
|
||||
* @author Maarten Coene
|
||||
* @version $Id$
|
||||
*/
|
||||
public class ArrayUtilsRemoveTest extends TestCase {
|
||||
public static void main(String[] args) {
|
||||
TestRunner.run(suite());
|
||||
}
|
||||
|
||||
public static Test suite() {
|
||||
TestSuite suite = new TestSuite(ArrayUtilsRemoveTest.class);
|
||||
suite.setName("ArrayUtils remove Tests");
|
||||
return suite;
|
||||
}
|
||||
|
||||
public void testRemoveObjectArray() {
|
||||
Object[] array;
|
||||
array = ArrayUtils.remove(new Object[] {"a"}, 0);
|
||||
assertTrue(Arrays.equals(ArrayUtils.EMPTY_OBJECT_ARRAY, array));
|
||||
assertEquals(Object.class, array.getClass().getComponentType());
|
||||
array = ArrayUtils.remove(new Object[] {"a", "b"}, 0);
|
||||
assertTrue(Arrays.equals(new Object[] {"b"}, array));
|
||||
assertEquals(Object.class, array.getClass().getComponentType());
|
||||
array = ArrayUtils.remove(new Object[] {"a", "b"}, 1);
|
||||
assertTrue(Arrays.equals(new Object[] {"a"}, array));
|
||||
assertEquals(Object.class, array.getClass().getComponentType());
|
||||
array = ArrayUtils.remove(new Object[] {"a", "b", "c"}, 1);
|
||||
assertTrue(Arrays.equals(new Object[] {"a", "c"}, array));
|
||||
assertEquals(Object.class, array.getClass().getComponentType());
|
||||
try {
|
||||
ArrayUtils.remove(new Object[] {"a", "b"}, -1);
|
||||
fail("IndexOutOfBoundsException expected");
|
||||
} catch (IndexOutOfBoundsException e) {}
|
||||
try {
|
||||
ArrayUtils.remove(new Object[] {"a", "b"}, 2);
|
||||
fail("IndexOutOfBoundsException expected");
|
||||
} catch (IndexOutOfBoundsException e) {}
|
||||
try {
|
||||
ArrayUtils.remove((Object[]) null, 0);
|
||||
fail("IndexOutOfBoundsException expected");
|
||||
} catch (IndexOutOfBoundsException e) {}
|
||||
}
|
||||
|
||||
public void testRemoveBooleanArray() {
|
||||
boolean[] array;
|
||||
array = ArrayUtils.remove(new boolean[] {true}, 0);
|
||||
assertTrue(Arrays.equals(ArrayUtils.EMPTY_BOOLEAN_ARRAY, array));
|
||||
assertEquals(Boolean.TYPE, array.getClass().getComponentType());
|
||||
array = ArrayUtils.remove(new boolean[] {true, false}, 0);
|
||||
assertTrue(Arrays.equals(new boolean[] {false}, array));
|
||||
assertEquals(Boolean.TYPE, array.getClass().getComponentType());
|
||||
array = ArrayUtils.remove(new boolean[] {true, false}, 1);
|
||||
assertTrue(Arrays.equals(new boolean[] {true}, array));
|
||||
assertEquals(Boolean.TYPE, array.getClass().getComponentType());
|
||||
array = ArrayUtils.remove(new boolean[] {true, false, true}, 1);
|
||||
assertTrue(Arrays.equals(new boolean[] {true, true}, array));
|
||||
assertEquals(Boolean.TYPE, array.getClass().getComponentType());
|
||||
try {
|
||||
ArrayUtils.remove(new boolean[] {true, false}, -1);
|
||||
fail("IndexOutOfBoundsException expected");
|
||||
} catch (IndexOutOfBoundsException e) {}
|
||||
try {
|
||||
ArrayUtils.remove(new boolean[] {true, false}, 2);
|
||||
fail("IndexOutOfBoundsException expected");
|
||||
} catch (IndexOutOfBoundsException e) {}
|
||||
try {
|
||||
ArrayUtils.remove((boolean[]) null, 0);
|
||||
fail("IndexOutOfBoundsException expected");
|
||||
} catch (IndexOutOfBoundsException e) {}
|
||||
}
|
||||
|
||||
public void testRemoveByteArray() {
|
||||
byte[] array;
|
||||
array = ArrayUtils.remove(new byte[] {1}, 0);
|
||||
assertTrue(Arrays.equals(ArrayUtils.EMPTY_BYTE_ARRAY, array));
|
||||
assertEquals(Byte.TYPE, array.getClass().getComponentType());
|
||||
array = ArrayUtils.remove(new byte[] {1, 2}, 0);
|
||||
assertTrue(Arrays.equals(new byte[] {2}, array));
|
||||
assertEquals(Byte.TYPE, array.getClass().getComponentType());
|
||||
array = ArrayUtils.remove(new byte[] {1, 2}, 1);
|
||||
assertTrue(Arrays.equals(new byte[] {1}, array));
|
||||
assertEquals(Byte.TYPE, array.getClass().getComponentType());
|
||||
array = ArrayUtils.remove(new byte[] {1, 2, 1}, 1);
|
||||
assertTrue(Arrays.equals(new byte[] {1, 1}, array));
|
||||
assertEquals(Byte.TYPE, array.getClass().getComponentType());
|
||||
try {
|
||||
ArrayUtils.remove(new byte[] {1, 2}, -1);
|
||||
fail("IndexOutOfBoundsException expected");
|
||||
} catch (IndexOutOfBoundsException e) {}
|
||||
try {
|
||||
ArrayUtils.remove(new byte[] {1, 2}, 2);
|
||||
fail("IndexOutOfBoundsException expected");
|
||||
} catch (IndexOutOfBoundsException e) {}
|
||||
try {
|
||||
ArrayUtils.remove((byte[]) null, 0);
|
||||
fail("IndexOutOfBoundsException expected");
|
||||
} catch (IndexOutOfBoundsException e) {}
|
||||
}
|
||||
|
||||
public void testRemoveCharArray() {
|
||||
char[] array;
|
||||
array = ArrayUtils.remove(new char[] {'a'}, 0);
|
||||
assertTrue(Arrays.equals(ArrayUtils.EMPTY_CHAR_ARRAY, array));
|
||||
assertEquals(Character.TYPE, array.getClass().getComponentType());
|
||||
array = ArrayUtils.remove(new char[] {'a', 'b'}, 0);
|
||||
assertTrue(Arrays.equals(new char[] {'b'}, array));
|
||||
assertEquals(Character.TYPE, array.getClass().getComponentType());
|
||||
array = ArrayUtils.remove(new char[] {'a', 'b'}, 1);
|
||||
assertTrue(Arrays.equals(new char[] {'a'}, array));
|
||||
assertEquals(Character.TYPE, array.getClass().getComponentType());
|
||||
array = ArrayUtils.remove(new char[] {'a', 'b', 'c'}, 1);
|
||||
assertTrue(Arrays.equals(new char[] {'a', 'c'}, array));
|
||||
assertEquals(Character.TYPE, array.getClass().getComponentType());
|
||||
try {
|
||||
ArrayUtils.remove(new char[] {'a', 'b'}, -1);
|
||||
fail("IndexOutOfBoundsException expected");
|
||||
} catch (IndexOutOfBoundsException e) {}
|
||||
try {
|
||||
ArrayUtils.remove(new char[] {'a', 'b'}, 2);
|
||||
fail("IndexOutOfBoundsException expected");
|
||||
} catch (IndexOutOfBoundsException e) {}
|
||||
try {
|
||||
ArrayUtils.remove((char[]) null, 0);
|
||||
fail("IndexOutOfBoundsException expected");
|
||||
} catch (IndexOutOfBoundsException e) {}
|
||||
}
|
||||
|
||||
public void testRemoveDoubleArray() {
|
||||
double[] array;
|
||||
array = ArrayUtils.remove(new double[] {1}, 0);
|
||||
assertTrue(Arrays.equals(ArrayUtils.EMPTY_DOUBLE_ARRAY, array));
|
||||
assertEquals(Double.TYPE, array.getClass().getComponentType());
|
||||
array = ArrayUtils.remove(new double[] {1, 2}, 0);
|
||||
assertTrue(Arrays.equals(new double[] {2}, array));
|
||||
assertEquals(Double.TYPE, array.getClass().getComponentType());
|
||||
array = ArrayUtils.remove(new double[] {1, 2}, 1);
|
||||
assertTrue(Arrays.equals(new double[] {1}, array));
|
||||
assertEquals(Double.TYPE, array.getClass().getComponentType());
|
||||
array = ArrayUtils.remove(new double[] {1, 2, 1}, 1);
|
||||
assertTrue(Arrays.equals(new double[] {1, 1}, array));
|
||||
assertEquals(Double.TYPE, array.getClass().getComponentType());
|
||||
try {
|
||||
ArrayUtils.remove(new double[] {1, 2}, -1);
|
||||
fail("IndexOutOfBoundsException expected");
|
||||
} catch (IndexOutOfBoundsException e) {}
|
||||
try {
|
||||
ArrayUtils.remove(new double[] {1, 2}, 2);
|
||||
fail("IndexOutOfBoundsException expected");
|
||||
} catch (IndexOutOfBoundsException e) {}
|
||||
try {
|
||||
ArrayUtils.remove((double[]) null, 0);
|
||||
fail("IndexOutOfBoundsException expected");
|
||||
} catch (IndexOutOfBoundsException e) {}
|
||||
}
|
||||
|
||||
public void testRemoveFloatArray() {
|
||||
float[] array;
|
||||
array = ArrayUtils.remove(new float[] {1}, 0);
|
||||
assertTrue(Arrays.equals(ArrayUtils.EMPTY_FLOAT_ARRAY, array));
|
||||
assertEquals(Float.TYPE, array.getClass().getComponentType());
|
||||
array = ArrayUtils.remove(new float[] {1, 2}, 0);
|
||||
assertTrue(Arrays.equals(new float[] {2}, array));
|
||||
assertEquals(Float.TYPE, array.getClass().getComponentType());
|
||||
array = ArrayUtils.remove(new float[] {1, 2}, 1);
|
||||
assertTrue(Arrays.equals(new float[] {1}, array));
|
||||
assertEquals(Float.TYPE, array.getClass().getComponentType());
|
||||
array = ArrayUtils.remove(new float[] {1, 2, 1}, 1);
|
||||
assertTrue(Arrays.equals(new float[] {1, 1}, array));
|
||||
assertEquals(Float.TYPE, array.getClass().getComponentType());
|
||||
try {
|
||||
ArrayUtils.remove(new float[] {1, 2}, -1);
|
||||
fail("IndexOutOfBoundsException expected");
|
||||
} catch (IndexOutOfBoundsException e) {}
|
||||
try {
|
||||
ArrayUtils.remove(new float[] {1, 2}, 2);
|
||||
fail("IndexOutOfBoundsException expected");
|
||||
} catch (IndexOutOfBoundsException e) {}
|
||||
try {
|
||||
ArrayUtils.remove((float[]) null, 0);
|
||||
fail("IndexOutOfBoundsException expected");
|
||||
} catch (IndexOutOfBoundsException e) {}
|
||||
}
|
||||
|
||||
public void testRemoveIntArray() {
|
||||
int[] array;
|
||||
array = ArrayUtils.remove(new int[] {1}, 0);
|
||||
assertTrue(Arrays.equals(ArrayUtils.EMPTY_INT_ARRAY, array));
|
||||
assertEquals(Integer.TYPE, array.getClass().getComponentType());
|
||||
array = ArrayUtils.remove(new int[] {1, 2}, 0);
|
||||
assertTrue(Arrays.equals(new int[] {2}, array));
|
||||
assertEquals(Integer.TYPE, array.getClass().getComponentType());
|
||||
array = ArrayUtils.remove(new int[] {1, 2}, 1);
|
||||
assertTrue(Arrays.equals(new int[] {1}, array));
|
||||
assertEquals(Integer.TYPE, array.getClass().getComponentType());
|
||||
array = ArrayUtils.remove(new int[] {1, 2, 1}, 1);
|
||||
assertTrue(Arrays.equals(new int[] {1, 1}, array));
|
||||
assertEquals(Integer.TYPE, array.getClass().getComponentType());
|
||||
try {
|
||||
ArrayUtils.remove(new int[] {1, 2}, -1);
|
||||
fail("IndexOutOfBoundsException expected");
|
||||
} catch (IndexOutOfBoundsException e) {}
|
||||
try {
|
||||
ArrayUtils.remove(new int[] {1, 2}, 2);
|
||||
fail("IndexOutOfBoundsException expected");
|
||||
} catch (IndexOutOfBoundsException e) {}
|
||||
try {
|
||||
ArrayUtils.remove((int[]) null, 0);
|
||||
fail("IndexOutOfBoundsException expected");
|
||||
} catch (IndexOutOfBoundsException e) {}
|
||||
}
|
||||
|
||||
public void testRemoveLongArray() {
|
||||
long[] array;
|
||||
array = ArrayUtils.remove(new long[] {1}, 0);
|
||||
assertTrue(Arrays.equals(ArrayUtils.EMPTY_LONG_ARRAY, array));
|
||||
assertEquals(Long.TYPE, array.getClass().getComponentType());
|
||||
array = ArrayUtils.remove(new long[] {1, 2}, 0);
|
||||
assertTrue(Arrays.equals(new long[] {2}, array));
|
||||
assertEquals(Long.TYPE, array.getClass().getComponentType());
|
||||
array = ArrayUtils.remove(new long[] {1, 2}, 1);
|
||||
assertTrue(Arrays.equals(new long[] {1}, array));
|
||||
assertEquals(Long.TYPE, array.getClass().getComponentType());
|
||||
array = ArrayUtils.remove(new long[] {1, 2, 1}, 1);
|
||||
assertTrue(Arrays.equals(new long[] {1, 1}, array));
|
||||
assertEquals(Long.TYPE, array.getClass().getComponentType());
|
||||
try {
|
||||
ArrayUtils.remove(new long[] {1, 2}, -1);
|
||||
fail("IndexOutOfBoundsException expected");
|
||||
} catch (IndexOutOfBoundsException e) {}
|
||||
try {
|
||||
ArrayUtils.remove(new long[] {1, 2}, 2);
|
||||
fail("IndexOutOfBoundsException expected");
|
||||
} catch (IndexOutOfBoundsException e) {}
|
||||
try {
|
||||
ArrayUtils.remove((long[]) null, 0);
|
||||
fail("IndexOutOfBoundsException expected");
|
||||
} catch (IndexOutOfBoundsException e) {}
|
||||
}
|
||||
|
||||
public void testRemoveShortArray() {
|
||||
short[] array;
|
||||
array = ArrayUtils.remove(new short[] {1}, 0);
|
||||
assertTrue(Arrays.equals(ArrayUtils.EMPTY_SHORT_ARRAY, array));
|
||||
assertEquals(Short.TYPE, array.getClass().getComponentType());
|
||||
array = ArrayUtils.remove(new short[] {1, 2}, 0);
|
||||
assertTrue(Arrays.equals(new short[] {2}, array));
|
||||
assertEquals(Short.TYPE, array.getClass().getComponentType());
|
||||
array = ArrayUtils.remove(new short[] {1, 2}, 1);
|
||||
assertTrue(Arrays.equals(new short[] {1}, array));
|
||||
assertEquals(Short.TYPE, array.getClass().getComponentType());
|
||||
array = ArrayUtils.remove(new short[] {1, 2, 1}, 1);
|
||||
assertTrue(Arrays.equals(new short[] {1, 1}, array));
|
||||
assertEquals(Short.TYPE, array.getClass().getComponentType());
|
||||
try {
|
||||
ArrayUtils.remove(new short[] {1, 2}, -1);
|
||||
fail("IndexOutOfBoundsException expected");
|
||||
} catch (IndexOutOfBoundsException e) {}
|
||||
try {
|
||||
ArrayUtils.remove(new short[] {1, 2}, 2);
|
||||
fail("IndexOutOfBoundsException expected");
|
||||
} catch (IndexOutOfBoundsException e) {}
|
||||
try {
|
||||
ArrayUtils.remove((short[]) null, 0);
|
||||
fail("IndexOutOfBoundsException expected");
|
||||
} catch (IndexOutOfBoundsException e) {}
|
||||
}
|
||||
|
||||
public void testRemoveElementObjectArray() {
|
||||
Object[] array;
|
||||
array = ArrayUtils.removeElement((Object[]) null, "a");
|
||||
assertNull(array);
|
||||
array = ArrayUtils.removeElement(ArrayUtils.EMPTY_OBJECT_ARRAY, "a");
|
||||
assertTrue(Arrays.equals(ArrayUtils.EMPTY_OBJECT_ARRAY, array));
|
||||
assertEquals(Object.class, array.getClass().getComponentType());
|
||||
array = ArrayUtils.removeElement(new Object[] {"a"}, "a");
|
||||
assertTrue(Arrays.equals(ArrayUtils.EMPTY_OBJECT_ARRAY, array));
|
||||
assertEquals(Object.class, array.getClass().getComponentType());
|
||||
array = ArrayUtils.removeElement(new Object[] {"a", "b"}, "a");
|
||||
assertTrue(Arrays.equals(new Object[] {"b"}, array));
|
||||
assertEquals(Object.class, array.getClass().getComponentType());
|
||||
array = ArrayUtils.removeElement(new Object[] {"a", "b", "a"}, "a");
|
||||
assertTrue(Arrays.equals(new Object[] {"b", "a"}, array));
|
||||
assertEquals(Object.class, array.getClass().getComponentType());
|
||||
}
|
||||
|
||||
public void testRemoveElementBooleanArray() {
|
||||
boolean[] array;
|
||||
array = ArrayUtils.removeElement((boolean[]) null, true);
|
||||
assertNull(array);
|
||||
array = ArrayUtils.removeElement(ArrayUtils.EMPTY_BOOLEAN_ARRAY, true);
|
||||
assertTrue(Arrays.equals(ArrayUtils.EMPTY_BOOLEAN_ARRAY, array));
|
||||
assertEquals(Boolean.TYPE, array.getClass().getComponentType());
|
||||
array = ArrayUtils.removeElement(new boolean[] {true}, true);
|
||||
assertTrue(Arrays.equals(ArrayUtils.EMPTY_BOOLEAN_ARRAY, array));
|
||||
assertEquals(Boolean.TYPE, array.getClass().getComponentType());
|
||||
array = ArrayUtils.removeElement(new boolean[] {true, false}, true);
|
||||
assertTrue(Arrays.equals(new boolean[] {false}, array));
|
||||
assertEquals(Boolean.TYPE, array.getClass().getComponentType());
|
||||
array = ArrayUtils.removeElement(new boolean[] {true, false, true}, true);
|
||||
assertTrue(Arrays.equals(new boolean[] {false, true}, array));
|
||||
assertEquals(Boolean.TYPE, array.getClass().getComponentType());
|
||||
}
|
||||
|
||||
public void testRemoveElementByteArray() {
|
||||
byte[] array;
|
||||
array = ArrayUtils.removeElement((byte[]) null, (byte) 1);
|
||||
assertNull(array);
|
||||
array = ArrayUtils.removeElement(ArrayUtils.EMPTY_BYTE_ARRAY, (byte) 1);
|
||||
assertTrue(Arrays.equals(ArrayUtils.EMPTY_BYTE_ARRAY, array));
|
||||
assertEquals(Byte.TYPE, array.getClass().getComponentType());
|
||||
array = ArrayUtils.removeElement(new byte[] {1}, (byte) 1);
|
||||
assertTrue(Arrays.equals(ArrayUtils.EMPTY_BYTE_ARRAY, array));
|
||||
assertEquals(Byte.TYPE, array.getClass().getComponentType());
|
||||
array = ArrayUtils.removeElement(new byte[] {1, 2}, (byte) 1);
|
||||
assertTrue(Arrays.equals(new byte[] {2}, array));
|
||||
assertEquals(Byte.TYPE, array.getClass().getComponentType());
|
||||
array = ArrayUtils.removeElement(new byte[] {1, 2, 1}, (byte) 1);
|
||||
assertTrue(Arrays.equals(new byte[] {2, 1}, array));
|
||||
assertEquals(Byte.TYPE, array.getClass().getComponentType());
|
||||
}
|
||||
|
||||
public void testRemoveElementCharArray() {
|
||||
char[] array;
|
||||
array = ArrayUtils.removeElement((char[]) null, 'a');
|
||||
assertNull(array);
|
||||
array = ArrayUtils.removeElement(ArrayUtils.EMPTY_CHAR_ARRAY, 'a');
|
||||
assertTrue(Arrays.equals(ArrayUtils.EMPTY_CHAR_ARRAY, array));
|
||||
assertEquals(Character.TYPE, array.getClass().getComponentType());
|
||||
array = ArrayUtils.removeElement(new char[] {'a'}, 'a');
|
||||
assertTrue(Arrays.equals(ArrayUtils.EMPTY_CHAR_ARRAY, array));
|
||||
assertEquals(Character.TYPE, array.getClass().getComponentType());
|
||||
array = ArrayUtils.removeElement(new char[] {'a', 'b'}, 'a');
|
||||
assertTrue(Arrays.equals(new char[] {'b'}, array));
|
||||
assertEquals(Character.TYPE, array.getClass().getComponentType());
|
||||
array = ArrayUtils.removeElement(new char[] {'a', 'b', 'a'}, 'a');
|
||||
assertTrue(Arrays.equals(new char[] {'b', 'a'}, array));
|
||||
assertEquals(Character.TYPE, array.getClass().getComponentType());
|
||||
}
|
||||
|
||||
public void testRemoveElementDoubleArray() {
|
||||
double[] array;
|
||||
array = ArrayUtils.removeElement((double[]) null, (double) 1);
|
||||
assertNull(array);
|
||||
array = ArrayUtils.removeElement(ArrayUtils.EMPTY_DOUBLE_ARRAY, (double) 1);
|
||||
assertTrue(Arrays.equals(ArrayUtils.EMPTY_DOUBLE_ARRAY, array));
|
||||
assertEquals(Double.TYPE, array.getClass().getComponentType());
|
||||
array = ArrayUtils.removeElement(new double[] {1}, (double) 1);
|
||||
assertTrue(Arrays.equals(ArrayUtils.EMPTY_DOUBLE_ARRAY, array));
|
||||
assertEquals(Double.TYPE, array.getClass().getComponentType());
|
||||
array = ArrayUtils.removeElement(new double[] {1, 2}, (double) 1);
|
||||
assertTrue(Arrays.equals(new double[] {2}, array));
|
||||
assertEquals(Double.TYPE, array.getClass().getComponentType());
|
||||
array = ArrayUtils.removeElement(new double[] {1, 2, 1}, (double) 1);
|
||||
assertTrue(Arrays.equals(new double[] {2, 1}, array));
|
||||
assertEquals(Double.TYPE, array.getClass().getComponentType());
|
||||
}
|
||||
|
||||
public void testRemoveElementFloatArray() {
|
||||
float[] array;
|
||||
array = ArrayUtils.removeElement((float[]) null, (float) 1);
|
||||
assertNull(array);
|
||||
array = ArrayUtils.removeElement(ArrayUtils.EMPTY_FLOAT_ARRAY, (float) 1);
|
||||
assertTrue(Arrays.equals(ArrayUtils.EMPTY_FLOAT_ARRAY, array));
|
||||
assertEquals(Float.TYPE, array.getClass().getComponentType());
|
||||
array = ArrayUtils.removeElement(new float[] {1}, (float) 1);
|
||||
assertTrue(Arrays.equals(ArrayUtils.EMPTY_FLOAT_ARRAY, array));
|
||||
assertEquals(Float.TYPE, array.getClass().getComponentType());
|
||||
array = ArrayUtils.removeElement(new float[] {1, 2}, (float) 1);
|
||||
assertTrue(Arrays.equals(new float[] {2}, array));
|
||||
assertEquals(Float.TYPE, array.getClass().getComponentType());
|
||||
array = ArrayUtils.removeElement(new float[] {1, 2, 1}, (float) 1);
|
||||
assertTrue(Arrays.equals(new float[] {2, 1}, array));
|
||||
assertEquals(Float.TYPE, array.getClass().getComponentType());
|
||||
}
|
||||
|
||||
public void testRemoveElementIntArray() {
|
||||
int[] array;
|
||||
array = ArrayUtils.removeElement((int[]) null, 1);
|
||||
assertNull(array);
|
||||
array = ArrayUtils.removeElement(ArrayUtils.EMPTY_INT_ARRAY, 1);
|
||||
assertTrue(Arrays.equals(ArrayUtils.EMPTY_INT_ARRAY, array));
|
||||
assertEquals(Integer.TYPE, array.getClass().getComponentType());
|
||||
array = ArrayUtils.removeElement(new int[] {1}, 1);
|
||||
assertTrue(Arrays.equals(ArrayUtils.EMPTY_INT_ARRAY, array));
|
||||
assertEquals(Integer.TYPE, array.getClass().getComponentType());
|
||||
array = ArrayUtils.removeElement(new int[] {1, 2}, 1);
|
||||
assertTrue(Arrays.equals(new int[] {2}, array));
|
||||
assertEquals(Integer.TYPE, array.getClass().getComponentType());
|
||||
array = ArrayUtils.removeElement(new int[] {1, 2, 1}, 1);
|
||||
assertTrue(Arrays.equals(new int[] {2, 1}, array));
|
||||
assertEquals(Integer.TYPE, array.getClass().getComponentType());
|
||||
}
|
||||
|
||||
public void testRemoveElementLongArray() {
|
||||
long[] array;
|
||||
array = ArrayUtils.removeElement((long[]) null, (long) 1);
|
||||
assertNull(array);
|
||||
array = ArrayUtils.removeElement(ArrayUtils.EMPTY_LONG_ARRAY, (long) 1);
|
||||
assertTrue(Arrays.equals(ArrayUtils.EMPTY_LONG_ARRAY, array));
|
||||
assertEquals(Long.TYPE, array.getClass().getComponentType());
|
||||
array = ArrayUtils.removeElement(new long[] {1}, (long) 1);
|
||||
assertTrue(Arrays.equals(ArrayUtils.EMPTY_LONG_ARRAY, array));
|
||||
assertEquals(Long.TYPE, array.getClass().getComponentType());
|
||||
array = ArrayUtils.removeElement(new long[] {1, 2}, (long) 1);
|
||||
assertTrue(Arrays.equals(new long[] {2}, array));
|
||||
assertEquals(Long.TYPE, array.getClass().getComponentType());
|
||||
array = ArrayUtils.removeElement(new long[] {1, 2, 1}, (long) 1);
|
||||
assertTrue(Arrays.equals(new long[] {2, 1}, array));
|
||||
assertEquals(Long.TYPE, array.getClass().getComponentType());
|
||||
}
|
||||
|
||||
public void testRemoveElementShortArray() {
|
||||
short[] array;
|
||||
array = ArrayUtils.removeElement((short[]) null, (short) 1);
|
||||
assertNull(array);
|
||||
array = ArrayUtils.removeElement(ArrayUtils.EMPTY_SHORT_ARRAY, (short) 1);
|
||||
assertTrue(Arrays.equals(ArrayUtils.EMPTY_SHORT_ARRAY, array));
|
||||
assertEquals(Short.TYPE, array.getClass().getComponentType());
|
||||
array = ArrayUtils.removeElement(new short[] {1}, (short) 1);
|
||||
assertTrue(Arrays.equals(ArrayUtils.EMPTY_SHORT_ARRAY, array));
|
||||
assertEquals(Short.TYPE, array.getClass().getComponentType());
|
||||
array = ArrayUtils.removeElement(new short[] {1, 2}, (short) 1);
|
||||
assertTrue(Arrays.equals(new short[] {2}, array));
|
||||
assertEquals(Short.TYPE, array.getClass().getComponentType());
|
||||
array = ArrayUtils.removeElement(new short[] {1, 2, 1}, (short) 1);
|
||||
assertTrue(Arrays.equals(new short[] {2, 1}, array));
|
||||
assertEquals(Short.TYPE, array.getClass().getComponentType());
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -38,7 +38,7 @@
|
|||
* @author Fredrik Westermarck
|
||||
* @author Gary Gregory
|
||||
* @author Maarten Coene
|
||||
* @version $Id: ArrayUtilsTest.java,v 1.29 2004/10/10 18:56:16 scolebourne Exp $
|
||||
* @version $Id$
|
||||
*/
|
||||
public class ArrayUtilsTest extends TestCase {
|
||||
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
*
|
||||
* @see CharEncoding
|
||||
* @author Gary D. Gregory
|
||||
* @version $Id: CharEncodingTest.java,v 1.1 2004/10/02 01:46:30 bayard Exp $
|
||||
* @version $Id$
|
||||
*/
|
||||
public class CharEncodingTest extends TestCase {
|
||||
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
* Unit tests {@link org.apache.commons.lang.CharRange}.
|
||||
*
|
||||
* @author Stephen Colebourne
|
||||
* @version $Id: CharRangeTest.java,v 1.4 2004/02/18 23:06:19 ggregory Exp $
|
||||
* @version $Id$
|
||||
*/
|
||||
public class CharRangeTest extends TestCase {
|
||||
|
||||
|
|
|
@ -27,7 +27,7 @@
|
|||
*
|
||||
* @author Stephen Colebourne
|
||||
* @author Phil Steitz
|
||||
* @version $Id: CharSetTest.java,v 1.4 2004/02/18 23:06:19 ggregory Exp $
|
||||
* @version $Id$
|
||||
*/
|
||||
public class CharSetTest extends TestCase {
|
||||
|
||||
|
|
|
@ -53,10 +53,10 @@ Sun Microsystems Inc. Java HotSpot(TM) Server VM 1.4.2_04-b05
|
|||
run_inlined_CharUtils_isAsciiNumeric: 84,420 milliseconds.
|
||||
|
||||
|
||||
* @version $Id: CharUtilsPerfTest.java,v 1.2 2004/03/19 00:29:32 ggregory Exp $
|
||||
* @version $Id$
|
||||
*/
|
||||
public class CharUtilsPerfTest {
|
||||
final static String VERSION = "$Id: CharUtilsPerfTest.java,v 1.2 2004/03/19 00:29:32 ggregory Exp $";
|
||||
final static String VERSION = "$Id$";
|
||||
|
||||
final static int WARM_UP = 100;
|
||||
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
* @author of original StringUtilsTest.testEscape = ?
|
||||
* @author <a href="mailto:alex@purpletech.com">Alexander Day Chaffee</a>
|
||||
* @author <a href="mailto:ggregory@seagullsw.com">Gary Gregory</a>
|
||||
* @version $Id: EntitiesTest.java,v 1.9 2004/02/18 23:06:19 ggregory Exp $
|
||||
* @version $Id$
|
||||
*/
|
||||
public class EntitiesTest extends TestCase
|
||||
{
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
* JUnit tests.
|
||||
*
|
||||
* @author Matthew Hawthorne
|
||||
* @version $Id: IllegalClassExceptionTest.java,v 1.4 2004/02/18 23:06:19 ggregory Exp $
|
||||
* @version $Id$
|
||||
* @see IllegalClassException
|
||||
*/
|
||||
public class IllegalClassExceptionTest extends TestCase {
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
* JUnit tests.
|
||||
*
|
||||
* @author Matthew Hawthorne
|
||||
* @version $Id: IncompleteArgumentExceptionTest.java,v 1.3 2004/02/18 23:06:19 ggregory Exp $
|
||||
* @version $Id$
|
||||
* @see IncompleteArgumentException
|
||||
*/
|
||||
public class IncompleteArgumentExceptionTest extends TestCase {
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
* @author Stephen Colebourne
|
||||
* @author <a href="mailto:ridesmet@users.sourceforge.net">Ringo De Smet</a>
|
||||
* @author Matthew Hawthorne
|
||||
* @version $Id: LangTestSuite.java,v 1.29 2004/10/02 01:46:30 bayard Exp $
|
||||
* @version $Id$
|
||||
*/
|
||||
public class LangTestSuite extends TestCase {
|
||||
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
* JUnit tests.
|
||||
*
|
||||
* @author Matthew Hawthorne
|
||||
* @version $Id: NotImplementedExceptionTest.java,v 1.4 2004/03/04 00:13:38 scolebourne Exp $
|
||||
* @version $Id$
|
||||
* @see NotImplementedException
|
||||
*/
|
||||
public class NotImplementedExceptionTest extends TestCase {
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
*
|
||||
* @author Matthew Hawthorne
|
||||
* @author Stephen Colebourne
|
||||
* @version $Id: NullArgumentExceptionTest.java,v 1.5 2004/10/15 23:10:33 scolebourne Exp $
|
||||
* @version $Id$
|
||||
* @see NullArgumentException
|
||||
*/
|
||||
public class NullArgumentExceptionTest extends TestCase {
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
* @author <a href="mailto:chrise@esha.com">Christopher Elkins</a>
|
||||
* @author <a href="mailto:ridesmet@users.sourceforge.net">Ringo De Smet</a>
|
||||
* @author Tim O'Brien
|
||||
* @version $Revision: 1.8 $ $Date$
|
||||
* @version $Revision$ $Date$
|
||||
*/
|
||||
|
||||
public final class NumberRangeTest extends TestCase {
|
||||
|
|
|
@ -30,7 +30,7 @@
|
|||
* @author Eric Pugh
|
||||
* @author Phil Steitz
|
||||
* @author Stephen Colebourne
|
||||
* @version $Id: NumberUtilsTest.java,v 1.11 2004/02/18 23:06:19 ggregory Exp $
|
||||
* @version $Id$
|
||||
*/
|
||||
public class NumberUtilsTest extends TestCase {
|
||||
|
||||
|
|
|
@ -30,7 +30,7 @@
|
|||
* @author <a href="mailto:scolebourne@joda.org">Stephen Colebourne</a>
|
||||
* @author <a href="mailto:ridesmet@users.sourceforge.net">Ringo De Smet</a>
|
||||
* @author <a href="mailto:ggregory@seagullsw.com">Gary Gregory</a>
|
||||
* @version $Id: ObjectUtilsTest.java,v 1.13 2004/06/01 21:08:48 scolebourne Exp $
|
||||
* @version $Id$
|
||||
*/
|
||||
public class ObjectUtilsTest extends TestCase {
|
||||
private static final String FOO = "foo";
|
||||
|
|
|
@ -29,7 +29,7 @@
|
|||
*
|
||||
* @author of original StringUtilsTest.testEscape = ?
|
||||
* @author <a href="mailto:alex@purpletech.com">Alexander Day Chaffee</a>
|
||||
* @version $Id: StringEscapeUtilsTest.java,v 1.15 2004/10/16 18:52:21 scolebourne Exp $
|
||||
* @version $Id$
|
||||
*/
|
||||
public class StringEscapeUtilsTest extends TestCase {
|
||||
private final static String FOO = "foo";
|
||||
|
|
|
@ -33,7 +33,7 @@
|
|||
* @author Stephen Colebourne
|
||||
* @author Tetsuya Kaneuchi
|
||||
* @author Gary D. Gregory
|
||||
* @version $Id: SystemUtilsTest.java,v 1.11 2004/11/12 00:48:41 scolebourne Exp $
|
||||
* @version $Id$
|
||||
*/
|
||||
public class SystemUtilsTest extends TestCase {
|
||||
public static void main(String[] args) {
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
* JUnit tests.
|
||||
*
|
||||
* @author Matthew Hawthorne
|
||||
* @version $Id: UnhandledExceptionTest.java,v 1.4 2004/02/18 23:22:29 ggregory Exp $
|
||||
* @version $Id$
|
||||
* @see UnhandledException
|
||||
*/
|
||||
public class UnhandledExceptionTest extends TestCase {
|
||||
|
|
|
@ -28,7 +28,7 @@
|
|||
* @author <a href="mailto:ridesmet@users.sourceforge.net">Ringo De Smet</a>
|
||||
* @author Henri Yandell
|
||||
* @author Stephen Colebourne
|
||||
* @version $Id: WordUtilsTest.java,v 1.8 2004/10/08 22:10:23 scolebourne Exp $
|
||||
* @version $Id$
|
||||
*/
|
||||
public class WordUtilsTest extends TestCase {
|
||||
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
* Test suite for the Lang Builder package.
|
||||
*
|
||||
* @author Stephen Colebourne
|
||||
* @version $Id: BuilderTestSuite.java,v 1.8 2004/12/28 23:13:03 scolebourne Exp $
|
||||
* @version $Id$
|
||||
*/
|
||||
public class BuilderTestSuite extends TestCase {
|
||||
|
||||
|
|
|
@ -27,7 +27,7 @@
|
|||
* Unit tests {@link org.apache.commons.lang.builder.DefaultToStringStyleTest}.
|
||||
*
|
||||
* @author <a href="mailto:scolebourne@joda.org">Stephen Colebourne</a>
|
||||
* @version $Id: DefaultToStringStyleTest.java,v 1.6 2004/02/18 23:00:51 ggregory Exp $
|
||||
* @version $Id$
|
||||
*/
|
||||
public class DefaultToStringStyleTest extends TestCase {
|
||||
|
||||
|
|
|
@ -29,7 +29,7 @@
|
|||
* @author <a href="mailto:scolebourne@joda.org">Stephen Colebourne</a>
|
||||
* @author <a href="mailto:ggregory@seagullsw.com">Gary Gregory</a>
|
||||
* @author Maarten Coene
|
||||
* @version $Id: EqualsBuilderTest.java,v 1.13 2005/01/17 01:59:52 ggregory Exp $
|
||||
* @version $Id$
|
||||
*/
|
||||
public class EqualsBuilderTest extends TestCase {
|
||||
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
* objects must have equal hash codes.
|
||||
*
|
||||
* @author Gary Gregory
|
||||
* @version $Id: HashCodeBuilderAndEqualsBuilderTest.java,v 1.5 2004/02/18 23:00:51 ggregory Exp $
|
||||
* @version $Id$
|
||||
*/
|
||||
public class HashCodeBuilderAndEqualsBuilderTest extends TestCase {
|
||||
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
* Unit tests {@link org.apache.commons.lang.builder.HashCodeBuilder}.
|
||||
*
|
||||
* @author <a href="mailto:scolebourne@joda.org">Stephen Colebourne</a>
|
||||
* @version $Id: HashCodeBuilderTest.java,v 1.7 2004/02/18 23:00:51 ggregory Exp $
|
||||
* @version $Id$
|
||||
*/
|
||||
public class HashCodeBuilderTest extends TestCase {
|
||||
|
||||
|
|
|
@ -28,7 +28,7 @@
|
|||
* Unit tests {@link org.apache.commons.lang.builder.MultiLineToStringStyleTest}.
|
||||
*
|
||||
* @author <a href="mailto:scolebourne@joda.org">Stephen Colebourne</a>
|
||||
* @version $Id: MultiLineToStringStyleTest.java,v 1.8 2004/02/18 23:22:30 ggregory Exp $
|
||||
* @version $Id$
|
||||
*/
|
||||
public class MultiLineToStringStyleTest extends TestCase {
|
||||
|
||||
|
|
|
@ -27,7 +27,7 @@
|
|||
* Unit tests {@link org.apache.commons.lang.builder.NoFieldNamesToStringStyleTest}.
|
||||
*
|
||||
* @author <a href="mailto:scolebourne@joda.org">Stephen Colebourne</a>
|
||||
* @version $Id: NoFieldNamesToStringStyleTest.java,v 1.6 2004/02/18 23:00:51 ggregory Exp $
|
||||
* @version $Id$
|
||||
*/
|
||||
public class NoFieldNamesToStringStyleTest extends TestCase {
|
||||
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
* Unit tests {@link org.apache.commons.lang.builder.ToStringStyle.SHORT_PREFIX_STYLE}.
|
||||
*
|
||||
* @author <a href="mailto:ggregory@seagullsw.com">Gary Gregory</a>
|
||||
* @version $Id: ShortPrefixToStringStyleTest.java,v 1.2 2004/02/18 23:00:51 ggregory Exp $
|
||||
* @version $Id$
|
||||
*/
|
||||
public class ShortPrefixToStringStyleTest extends TestCase {
|
||||
|
||||
|
|
|
@ -27,7 +27,7 @@
|
|||
* Unit tests {@link org.apache.commons.lang.builder.SimpleToStringStyleTest}.
|
||||
*
|
||||
* @author <a href="mailto:scolebourne@joda.org">Stephen Colebourne</a>
|
||||
* @version $Id: SimpleToStringStyleTest.java,v 1.6 2004/02/18 23:00:51 ggregory Exp $
|
||||
* @version $Id$
|
||||
*/
|
||||
public class SimpleToStringStyleTest extends TestCase {
|
||||
|
||||
|
|
|
@ -27,7 +27,7 @@
|
|||
* Unit tests {@link org.apache.commons.lang.builder.ToStringStyle}.
|
||||
*
|
||||
* @author <a href="mailto:scolebourne@joda.org">Stephen Colebourne</a>
|
||||
* @version $Id: StandardToStringStyleTest.java,v 1.7 2004/02/18 23:00:51 ggregory Exp $
|
||||
* @version $Id$
|
||||
*/
|
||||
public class StandardToStringStyleTest extends TestCase {
|
||||
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
* Test case for ToStringStyle.
|
||||
*
|
||||
* @author Masato Tezuka
|
||||
* @version $Id: ToStringStyleTest.java,v 1.1 2004/12/28 23:13:03 scolebourne Exp $
|
||||
* @version $Id$
|
||||
*/
|
||||
public class ToStringStyleTest extends TestCase {
|
||||
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
* Broken color enumeration.
|
||||
*
|
||||
* @author <a href="mailto:scolebourne@joda.org">Stephen Colebourne</a>
|
||||
* @version $Id: Broken1Enum.java,v 1.4 2004/02/18 23:01:51 ggregory Exp $
|
||||
* @version $Id$
|
||||
*/
|
||||
public final class Broken1Enum extends Enum {
|
||||
public static final Broken1Enum RED = new Broken1Enum("Red");
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
* Broken Operator enumeration, null class.
|
||||
*
|
||||
* @author Stephen Colebourne
|
||||
* @version $Id: Broken1OperationEnum.java,v 1.3 2004/02/18 23:01:51 ggregory Exp $
|
||||
* @version $Id$
|
||||
*/
|
||||
public abstract class Broken1OperationEnum extends Enum {
|
||||
// This syntax works for JDK 1.3 and upwards:
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
* Broken color enumeration.
|
||||
*
|
||||
* @author <a href="mailto:scolebourne@joda.org">Stephen Colebourne</a>
|
||||
* @version $Id: Broken2Enum.java,v 1.4 2004/02/18 23:01:51 ggregory Exp $
|
||||
* @version $Id$
|
||||
*/
|
||||
public final class Broken2Enum extends Enum {
|
||||
public static final Broken2Enum RED = new Broken2Enum("Red");
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
* Broken Operator enumeration, getEnumClass() not superclass.
|
||||
*
|
||||
* @author Stephen Colebourne
|
||||
* @version $Id: Broken2OperationEnum.java,v 1.3 2004/02/18 23:01:51 ggregory Exp $
|
||||
* @version $Id$
|
||||
*/
|
||||
public abstract class Broken2OperationEnum extends Enum {
|
||||
// This syntax works for JDK 1.3 and upwards:
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
* Broken color enumeration.
|
||||
*
|
||||
* @author <a href="mailto:scolebourne@joda.org">Stephen Colebourne</a>
|
||||
* @version $Id: Broken3Enum.java,v 1.4 2004/02/18 23:01:51 ggregory Exp $
|
||||
* @version $Id$
|
||||
*/
|
||||
public final class Broken3Enum extends Enum {
|
||||
public static final Broken3Enum RED = new Broken3Enum("Red");
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
* Broken Operator enumeration, getEnumClass() is Enum.class.
|
||||
*
|
||||
* @author Stephen Colebourne
|
||||
* @version $Id: Broken3OperationEnum.java,v 1.3 2004/02/18 23:01:51 ggregory Exp $
|
||||
* @version $Id$
|
||||
*/
|
||||
public abstract class Broken3OperationEnum extends Enum {
|
||||
// This syntax works for JDK 1.3 and upwards:
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
* Broken Operator enumeration, getEnumClass() is ValuedEnum.class.
|
||||
*
|
||||
* @author Stephen Colebourne
|
||||
* @version $Id: Broken4OperationEnum.java,v 1.3 2004/02/18 23:01:51 ggregory Exp $
|
||||
* @version $Id$
|
||||
*/
|
||||
public abstract class Broken4OperationEnum extends Enum {
|
||||
// This syntax works for JDK 1.3 and upwards:
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
* Broken Operator enumeration, getEnumClass() is not an Enum class.
|
||||
*
|
||||
* @author Stephen Colebourne
|
||||
* @version $Id: Broken5OperationEnum.java,v 1.3 2004/02/18 23:01:51 ggregory Exp $
|
||||
* @version $Id$
|
||||
*/
|
||||
public abstract class Broken5OperationEnum extends Enum {
|
||||
// This syntax works for JDK 1.3 and upwards:
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
* Color enumeration.
|
||||
*
|
||||
* @author <a href="mailto:scolebourne@joda.org">Stephen Colebourne</a>
|
||||
* @version $Id: ColorEnum.java,v 1.4 2004/02/18 23:01:51 ggregory Exp $
|
||||
* @version $Id$
|
||||
*/
|
||||
|
||||
public final class ColorEnum extends Enum {
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
* Dummy enumeration - no values.
|
||||
*
|
||||
* @author Stephen Colebourne
|
||||
* @version $Id: DummyEnum.java,v 1.3 2004/02/18 23:01:51 ggregory Exp $
|
||||
* @version $Id$
|
||||
*/
|
||||
public abstract class DummyEnum extends Enum {
|
||||
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue