Add missing @Override markers
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@753646 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/src/java/org/apache/commons/lang/exception/NestableError.java b/src/java/org/apache/commons/lang/exception/NestableError.java
index 3b86b8e..a2b059b 100644
--- a/src/java/org/apache/commons/lang/exception/NestableError.java
+++ b/src/java/org/apache/commons/lang/exception/NestableError.java
@@ -94,6 +94,7 @@
/**
* {@inheritDoc}
*/
+ @Override
public Throwable getCause() {
return cause;
}
@@ -105,6 +106,7 @@
*
* @return String message string of the throwable
*/
+ @Override
public String getMessage() {
if (super.getMessage() != null) {
return super.getMessage();
@@ -170,6 +172,7 @@
/**
* {@inheritDoc}
*/
+ @Override
public void printStackTrace() {
delegate.printStackTrace();
}
@@ -177,6 +180,7 @@
/**
* {@inheritDoc}
*/
+ @Override
public void printStackTrace(PrintStream out) {
delegate.printStackTrace(out);
}
@@ -184,6 +188,7 @@
/**
* {@inheritDoc}
*/
+ @Override
public void printStackTrace(PrintWriter out) {
delegate.printStackTrace(out);
}
diff --git a/src/java/org/apache/commons/lang/exception/NestableException.java b/src/java/org/apache/commons/lang/exception/NestableException.java
index d03e8f8..7b2a402 100644
--- a/src/java/org/apache/commons/lang/exception/NestableException.java
+++ b/src/java/org/apache/commons/lang/exception/NestableException.java
@@ -154,6 +154,7 @@
/**
* {@inheritDoc}
*/
+ @Override
public Throwable getCause() {
return cause;
}
@@ -165,6 +166,7 @@
*
* @return String message string of the throwable
*/
+ @Override
public String getMessage() {
if (super.getMessage() != null) {
return super.getMessage();
@@ -230,6 +232,7 @@
/**
* {@inheritDoc}
*/
+ @Override
public void printStackTrace() {
delegate.printStackTrace();
}
@@ -237,6 +240,7 @@
/**
* {@inheritDoc}
*/
+ @Override
public void printStackTrace(PrintStream out) {
delegate.printStackTrace(out);
}
@@ -244,6 +248,7 @@
/**
* {@inheritDoc}
*/
+ @Override
public void printStackTrace(PrintWriter out) {
delegate.printStackTrace(out);
}
diff --git a/src/java/org/apache/commons/lang/exception/NestableRuntimeException.java b/src/java/org/apache/commons/lang/exception/NestableRuntimeException.java
index 7d1c69f..e11c6c8 100644
--- a/src/java/org/apache/commons/lang/exception/NestableRuntimeException.java
+++ b/src/java/org/apache/commons/lang/exception/NestableRuntimeException.java
@@ -98,6 +98,7 @@
/**
* {@inheritDoc}
*/
+ @Override
public Throwable getCause() {
return cause;
}
@@ -109,6 +110,7 @@
*
* @return String message string of the throwable
*/
+ @Override
public String getMessage() {
if (super.getMessage() != null) {
return super.getMessage();
@@ -174,6 +176,7 @@
/**
* {@inheritDoc}
*/
+ @Override
public void printStackTrace() {
delegate.printStackTrace();
}
@@ -181,6 +184,7 @@
/**
* {@inheritDoc}
*/
+ @Override
public void printStackTrace(PrintStream out) {
delegate.printStackTrace(out);
}
@@ -188,6 +192,7 @@
/**
* {@inheritDoc}
*/
+ @Override
public void printStackTrace(PrintWriter out) {
delegate.printStackTrace(out);
}
diff --git a/src/java/org/apache/commons/lang/math/DoubleRange.java b/src/java/org/apache/commons/lang/math/DoubleRange.java
index 59d9101..8c62075 100644
--- a/src/java/org/apache/commons/lang/math/DoubleRange.java
+++ b/src/java/org/apache/commons/lang/math/DoubleRange.java
@@ -177,6 +177,7 @@
*
* @return the minimum number in this range
*/
+ @Override
public Number getMinimumNumber() {
if (minObject == null) {
minObject = new Double(min);
@@ -191,6 +192,7 @@
*
* @return the minimum number in this range
*/
+ @Override
public long getMinimumLong() {
return (long) min;
}
@@ -202,6 +204,7 @@
*
* @return the minimum number in this range
*/
+ @Override
public int getMinimumInteger() {
return (int) min;
}
@@ -211,6 +214,7 @@
*
* @return the minimum number in this range
*/
+ @Override
public double getMinimumDouble() {
return min;
}
@@ -222,6 +226,7 @@
*
* @return the minimum number in this range
*/
+ @Override
public float getMinimumFloat() {
return (float) min;
}
@@ -231,6 +236,7 @@
*
* @return the maximum number in this range
*/
+ @Override
public Number getMaximumNumber() {
if (maxObject == null) {
maxObject = new Double(max);
@@ -245,6 +251,7 @@
*
* @return the maximum number in this range
*/
+ @Override
public long getMaximumLong() {
return (long) max;
}
@@ -256,6 +263,7 @@
*
* @return the maximum number in this range
*/
+ @Override
public int getMaximumInteger() {
return (int) max;
}
@@ -265,6 +273,7 @@
*
* @return the maximum number in this range
*/
+ @Override
public double getMaximumDouble() {
return max;
}
@@ -276,6 +285,7 @@
*
* @return the maximum number in this range
*/
+ @Override
public float getMaximumFloat() {
return (float) max;
}
@@ -292,6 +302,7 @@
* @param number the number to test, may be <code>null</code>
* @return <code>true</code> if the specified number occurs within this range
*/
+ @Override
public boolean containsNumber(Number number) {
if (number == null) {
return false;
@@ -310,6 +321,7 @@
* @return <code>true</code> if the specified number occurs within this
* range by <code>double</code> comparison
*/
+ @Override
public boolean containsDouble(double value) {
return value >= min && value <= max;
}
@@ -327,6 +339,7 @@
* @return <code>true</code> if the specified range occurs entirely within this range
* @throws IllegalArgumentException if the range is not of this type
*/
+ @Override
public boolean containsRange(Range range) {
if (range == null) {
return false;
@@ -344,6 +357,7 @@
* @param range the range to test, may be <code>null</code>
* @return <code>true</code> if the specified range overlaps with this range
*/
+ @Override
public boolean overlapsRange(Range range) {
if (range == null) {
return false;
@@ -364,6 +378,7 @@
* @param obj the reference object with which to compare
* @return <code>true</code> if this object is equal
*/
+ @Override
public boolean equals(Object obj) {
if (obj == this) {
return true;
@@ -381,6 +396,7 @@
*
* @return a hash code value for this object
*/
+ @Override
public int hashCode() {
if (hashCode == 0) {
hashCode = 17;
@@ -400,6 +416,7 @@
*
* @return the <code>String</code> representation of this range
*/
+ @Override
public String toString() {
if (toString == null) {
StringBuffer buf = new StringBuffer(32);
diff --git a/src/java/org/apache/commons/lang/math/FloatRange.java b/src/java/org/apache/commons/lang/math/FloatRange.java
index 444a586..d22c701 100644
--- a/src/java/org/apache/commons/lang/math/FloatRange.java
+++ b/src/java/org/apache/commons/lang/math/FloatRange.java
@@ -177,6 +177,7 @@
*
* @return the minimum number in this range
*/
+ @Override
public Number getMinimumNumber() {
if (minObject == null) {
minObject = new Float(min);
@@ -191,6 +192,7 @@
*
* @return the minimum number in this range
*/
+ @Override
public long getMinimumLong() {
return (long) min;
}
@@ -202,6 +204,7 @@
*
* @return the minimum number in this range
*/
+ @Override
public int getMinimumInteger() {
return (int) min;
}
@@ -211,6 +214,7 @@
*
* @return the minimum number in this range
*/
+ @Override
public double getMinimumDouble() {
return min;
}
@@ -220,6 +224,7 @@
*
* @return the minimum number in this range
*/
+ @Override
public float getMinimumFloat() {
return min;
}
@@ -229,6 +234,7 @@
*
* @return the maximum number in this range
*/
+ @Override
public Number getMaximumNumber() {
if (maxObject == null) {
maxObject = new Float(max);
@@ -243,6 +249,7 @@
*
* @return the maximum number in this range
*/
+ @Override
public long getMaximumLong() {
return (long) max;
}
@@ -254,6 +261,7 @@
*
* @return the maximum number in this range
*/
+ @Override
public int getMaximumInteger() {
return (int) max;
}
@@ -263,6 +271,7 @@
*
* @return the maximum number in this range
*/
+ @Override
public double getMaximumDouble() {
return max;
}
@@ -272,6 +281,7 @@
*
* @return the maximum number in this range
*/
+ @Override
public float getMaximumFloat() {
return max;
}
@@ -288,6 +298,7 @@
* @param number the number to test, may be <code>null</code>
* @return <code>true</code> if the specified number occurs within this range
*/
+ @Override
public boolean containsNumber(Number number) {
if (number == null) {
return false;
@@ -306,6 +317,7 @@
* @return <code>true</code> if the specified number occurs within this
* range by <code>float</code> comparison
*/
+ @Override
public boolean containsFloat(float value) {
return value >= min && value <= max;
}
@@ -323,6 +335,7 @@
* @return <code>true</code> if the specified range occurs entirely within this range
* @throws IllegalArgumentException if the range is not of this type
*/
+ @Override
public boolean containsRange(Range range) {
if (range == null) {
return false;
@@ -340,6 +353,7 @@
* @param range the range to test, may be <code>null</code>
* @return <code>true</code> if the specified range overlaps with this range
*/
+ @Override
public boolean overlapsRange(Range range) {
if (range == null) {
return false;
@@ -360,6 +374,7 @@
* @param obj the reference object with which to compare
* @return <code>true</code> if this object is equal
*/
+ @Override
public boolean equals(Object obj) {
if (obj == this) {
return true;
@@ -377,6 +392,7 @@
*
* @return a hash code value for this object
*/
+ @Override
public int hashCode() {
if (hashCode == 0) {
hashCode = 17;
@@ -394,6 +410,7 @@
*
* @return the <code>String</code> representation of this range
*/
+ @Override
public String toString() {
if (toString == null) {
StringBuffer buf = new StringBuffer(32);
diff --git a/src/java/org/apache/commons/lang/math/Fraction.java b/src/java/org/apache/commons/lang/math/Fraction.java
index 3347689..a3e7a90 100644
--- a/src/java/org/apache/commons/lang/math/Fraction.java
+++ b/src/java/org/apache/commons/lang/math/Fraction.java
@@ -416,6 +416,7 @@
*
* @return the whole number fraction part
*/
+ @Override
public int intValue() {
return numerator / denominator;
}
@@ -426,6 +427,7 @@
*
* @return the whole number fraction part
*/
+ @Override
public long longValue() {
return (long) numerator / denominator;
}
@@ -436,6 +438,7 @@
*
* @return the fraction as a <code>float</code>
*/
+ @Override
public float floatValue() {
return ((float) numerator) / ((float) denominator);
}
@@ -446,6 +449,7 @@
*
* @return the fraction as a <code>double</code>
*/
+ @Override
public double doubleValue() {
return ((double) numerator) / ((double) denominator);
}
@@ -829,6 +833,7 @@
* @param obj the reference object with which to compare
* @return <code>true</code> if this object is equal
*/
+ @Override
public boolean equals(Object obj) {
if (obj == this) {
return true;
@@ -846,6 +851,7 @@
*
* @return a hash code value for this object
*/
+ @Override
public int hashCode() {
if (hashCode == 0) {
// hashcode update should be atomic.
@@ -894,6 +900,7 @@
*
* @return a <code>String</code> form of the fraction
*/
+ @Override
public String toString() {
if (toString == null) {
toString = new StringBuffer(32)
diff --git a/src/java/org/apache/commons/lang/math/IntRange.java b/src/java/org/apache/commons/lang/math/IntRange.java
index 96dd7a9..fb5155d 100644
--- a/src/java/org/apache/commons/lang/math/IntRange.java
+++ b/src/java/org/apache/commons/lang/math/IntRange.java
@@ -160,6 +160,7 @@
*
* @return the minimum number in this range
*/
+ @Override
public Number getMinimumNumber() {
if (minObject == null) {
minObject = new Integer(min);
@@ -172,6 +173,7 @@
*
* @return the minimum number in this range
*/
+ @Override
public long getMinimumLong() {
return min;
}
@@ -181,6 +183,7 @@
*
* @return the minimum number in this range
*/
+ @Override
public int getMinimumInteger() {
return min;
}
@@ -190,6 +193,7 @@
*
* @return the minimum number in this range
*/
+ @Override
public double getMinimumDouble() {
return min;
}
@@ -199,6 +203,7 @@
*
* @return the minimum number in this range
*/
+ @Override
public float getMinimumFloat() {
return min;
}
@@ -208,6 +213,7 @@
*
* @return the maximum number in this range
*/
+ @Override
public Number getMaximumNumber() {
if (maxObject == null) {
maxObject = new Integer(max);
@@ -220,6 +226,7 @@
*
* @return the maximum number in this range
*/
+ @Override
public long getMaximumLong() {
return max;
}
@@ -229,6 +236,7 @@
*
* @return the maximum number in this range
*/
+ @Override
public int getMaximumInteger() {
return max;
}
@@ -238,6 +246,7 @@
*
* @return the maximum number in this range
*/
+ @Override
public double getMaximumDouble() {
return max;
}
@@ -247,6 +256,7 @@
*
* @return the maximum number in this range
*/
+ @Override
public float getMaximumFloat() {
return max;
}
@@ -263,6 +273,7 @@
* @param number the number to test, may be <code>null</code>
* @return <code>true</code> if the specified number occurs within this range
*/
+ @Override
public boolean containsNumber(Number number) {
if (number == null) {
return false;
@@ -281,6 +292,7 @@
* @return <code>true</code> if the specified number occurs within this
* range by <code>int</code> comparison
*/
+ @Override
public boolean containsInteger(int value) {
return value >= min && value <= max;
}
@@ -298,6 +310,7 @@
* @return <code>true</code> if the specified range occurs entirely within this range
* @throws IllegalArgumentException if the range is not of this type
*/
+ @Override
public boolean containsRange(Range range) {
if (range == null) {
return false;
@@ -315,6 +328,7 @@
* @param range the range to test, may be <code>null</code>
* @return <code>true</code> if the specified range overlaps with this range
*/
+ @Override
public boolean overlapsRange(Range range) {
if (range == null) {
return false;
@@ -335,6 +349,7 @@
* @param obj the reference object with which to compare
* @return <code>true</code> if this object is equal
*/
+ @Override
public boolean equals(Object obj) {
if (obj == this) {
return true;
@@ -351,6 +366,7 @@
*
* @return a hash code value for this object
*/
+ @Override
public int hashCode() {
if (hashCode == 0) {
hashCode = 17;
@@ -368,6 +384,7 @@
*
* @return the <code>String</code> representation of this range
*/
+ @Override
public String toString() {
if (toString == null) {
StringBuffer buf = new StringBuffer(32);
diff --git a/src/java/org/apache/commons/lang/math/JVMRandom.java b/src/java/org/apache/commons/lang/math/JVMRandom.java
index 3804b78..e5fa470 100644
--- a/src/java/org/apache/commons/lang/math/JVMRandom.java
+++ b/src/java/org/apache/commons/lang/math/JVMRandom.java
@@ -59,6 +59,7 @@
* @param seed ignored
* @throws UnsupportedOperationException
*/
+ @Override
public synchronized void setSeed(long seed) {
if (this.constructed) {
throw new UnsupportedOperationException();
@@ -71,6 +72,7 @@
* @return Nothing, this method always throws an UnsupportedOperationException.
* @throws UnsupportedOperationException
*/
+ @Override
public synchronized double nextGaussian() {
throw new UnsupportedOperationException();
}
@@ -81,6 +83,7 @@
* @param byteArray ignored
* @throws UnsupportedOperationException
*/
+ @Override
public void nextBytes(byte[] byteArray) {
throw new UnsupportedOperationException();
}
@@ -91,6 +94,7 @@
*
* @return the random int
*/
+ @Override
public int nextInt() {
return nextInt(Integer.MAX_VALUE);
}
@@ -103,6 +107,7 @@
* @return the random int
* @throws IllegalArgumentException when <code>n <= 0</code>
*/
+ @Override
public int nextInt(int n) {
if (n <= 0) {
throw new IllegalArgumentException(
@@ -117,6 +122,7 @@
* from the Math.random() sequence.</p>
* @return the random long
*/
+ @Override
public long nextLong() {
// possible loss of precision?
return nextLong(Long.MAX_VALUE);
@@ -148,6 +154,7 @@
*
* @return the random boolean
*/
+ @Override
public boolean nextBoolean() {
return Math.random() > 0.5;
}
@@ -158,6 +165,7 @@
*
* @return the random float
*/
+ @Override
public float nextFloat() {
return (float)Math.random();
}
@@ -166,6 +174,7 @@
*
* @return the random double
*/
+ @Override
public double nextDouble() {
return Math.random();
}
diff --git a/src/java/org/apache/commons/lang/math/LongRange.java b/src/java/org/apache/commons/lang/math/LongRange.java
index 5cfbc59..9713515 100644
--- a/src/java/org/apache/commons/lang/math/LongRange.java
+++ b/src/java/org/apache/commons/lang/math/LongRange.java
@@ -161,6 +161,7 @@
*
* @return the minimum number in this range
*/
+ @Override
public Number getMinimumNumber() {
if (minObject == null) {
minObject = new Long(min);
@@ -173,6 +174,7 @@
*
* @return the minimum number in this range
*/
+ @Override
public long getMinimumLong() {
return min;
}
@@ -184,6 +186,7 @@
*
* @return the minimum number in this range
*/
+ @Override
public int getMinimumInteger() {
return (int) min;
}
@@ -195,6 +198,7 @@
*
* @return the minimum number in this range
*/
+ @Override
public double getMinimumDouble() {
return min;
}
@@ -206,6 +210,7 @@
*
* @return the minimum number in this range
*/
+ @Override
public float getMinimumFloat() {
return min;
}
@@ -215,6 +220,7 @@
*
* @return the maximum number in this range
*/
+ @Override
public Number getMaximumNumber() {
if (maxObject == null) {
maxObject = new Long(max);
@@ -227,6 +233,7 @@
*
* @return the maximum number in this range
*/
+ @Override
public long getMaximumLong() {
return max;
}
@@ -238,6 +245,7 @@
*
* @return the maximum number in this range cast to an <code>int</code>.
*/
+ @Override
public int getMaximumInteger() {
return (int) max;
}
@@ -249,6 +257,7 @@
*
* @return The maximum number in this range as a <code>double</code>.
*/
+ @Override
public double getMaximumDouble() {
return max;
}
@@ -260,6 +269,7 @@
*
* @return The maximum number in this range as a <code>float</code>.
*/
+ @Override
public float getMaximumFloat() {
return max;
}
@@ -276,6 +286,7 @@
* @param number the number to test, may be <code>null</code>
* @return <code>true</code> if the specified number occurs within this range
*/
+ @Override
public boolean containsNumber(Number number) {
if (number == null) {
return false;
@@ -294,6 +305,7 @@
* @return <code>true</code> if the specified number occurs within this
* range by <code>long</code> comparison
*/
+ @Override
public boolean containsLong(long value) {
return value >= min && value <= max;
}
@@ -311,6 +323,7 @@
* @return <code>true</code> if the specified range occurs entirely within this range
* @throws IllegalArgumentException if the range is not of this type
*/
+ @Override
public boolean containsRange(Range range) {
if (range == null) {
return false;
@@ -328,6 +341,7 @@
* @param range the range to test, may be <code>null</code>
* @return <code>true</code> if the specified range overlaps with this range
*/
+ @Override
public boolean overlapsRange(Range range) {
if (range == null) {
return false;
@@ -348,6 +362,7 @@
* @param obj the reference object with which to compare
* @return <code>true</code> if this object is equal
*/
+ @Override
public boolean equals(Object obj) {
if (obj == this) {
return true;
@@ -364,6 +379,7 @@
*
* @return a hash code value for this object
*/
+ @Override
public int hashCode() {
if (hashCode == 0) {
hashCode = 17;
@@ -381,6 +397,7 @@
*
* @return the <code>String</code> representation of this range
*/
+ @Override
public String toString() {
if (toString == null) {
StringBuffer buf = new StringBuffer(32);
diff --git a/src/java/org/apache/commons/lang/math/NumberRange.java b/src/java/org/apache/commons/lang/math/NumberRange.java
index 3420ec9..5f1236f 100644
--- a/src/java/org/apache/commons/lang/math/NumberRange.java
+++ b/src/java/org/apache/commons/lang/math/NumberRange.java
@@ -140,6 +140,7 @@
*
* @return the minimum number in this range
*/
+ @Override
public Number getMinimumNumber() {
return min;
}
@@ -149,6 +150,7 @@
*
* @return the maximum number in this range
*/
+ @Override
public Number getMaximumNumber() {
return max;
}
@@ -166,6 +168,7 @@
* @return <code>true</code> if the specified number occurs within this range
* @throws IllegalArgumentException if the number is of a different type to the range
*/
+ @Override
public boolean containsNumber(Number number) {
if (number == null) {
return false;
@@ -193,6 +196,7 @@
* @param obj the reference object with which to compare
* @return <code>true</code> if this object is equal
*/
+ @Override
public boolean equals(Object obj) {
if (obj == this) {
return true;
@@ -209,6 +213,7 @@
*
* @return a hash code value for this object
*/
+ @Override
public int hashCode() {
if (hashCode == 0) {
hashCode = 17;
@@ -226,6 +231,7 @@
*
* @return the <code>String</code> representation of this range
*/
+ @Override
public String toString() {
if (toString == null) {
StringBuffer buf = new StringBuffer(32);
diff --git a/src/java/org/apache/commons/lang/math/Range.java b/src/java/org/apache/commons/lang/math/Range.java
index 4ac97ff..dbc89b6 100644
--- a/src/java/org/apache/commons/lang/math/Range.java
+++ b/src/java/org/apache/commons/lang/math/Range.java
@@ -378,6 +378,7 @@
* @param obj the reference object with which to compare
* @return <code>true</code> if this object is equal
*/
+ @Override
public boolean equals(Object obj) {
if (obj == this) {
return true;
@@ -399,6 +400,7 @@
*
* @return a hash code value for this object
*/
+ @Override
public int hashCode() {
int result = 17;
result = 37 * result + getClass().hashCode();
@@ -418,6 +420,7 @@
*
* @return the <code>String</code> representation of this range
*/
+ @Override
public String toString() {
StringBuffer buf = new StringBuffer(32);
buf.append("Range[");
diff --git a/src/java/org/apache/commons/lang/mutable/MutableBoolean.java b/src/java/org/apache/commons/lang/mutable/MutableBoolean.java
index 6c92ee1..16b4f8d 100644
--- a/src/java/org/apache/commons/lang/mutable/MutableBoolean.java
+++ b/src/java/org/apache/commons/lang/mutable/MutableBoolean.java
@@ -109,6 +109,7 @@
* the object to compare with.
* @return <code>true</code> if the objects are the same; <code>false</code> otherwise.
*/
+ @Override
public boolean equals(Object obj) {
if (obj instanceof MutableBoolean) {
return value == ((MutableBoolean) obj).booleanValue();
@@ -132,6 +133,7 @@
* @return the integer <code>1231</code> if this object represents <code>true</code>; returns the integer
* <code>1237</code> if this object represents <code>false</code>.
*/
+ @Override
public int hashCode() {
return value ? Boolean.TRUE.hashCode() : Boolean.FALSE.hashCode();
}
@@ -165,6 +167,7 @@
*
* @return the mutable value as a string
*/
+ @Override
public String toString() {
return String.valueOf(value);
}
diff --git a/src/java/org/apache/commons/lang/mutable/MutableByte.java b/src/java/org/apache/commons/lang/mutable/MutableByte.java
index bcee4b9..ff39d97 100644
--- a/src/java/org/apache/commons/lang/mutable/MutableByte.java
+++ b/src/java/org/apache/commons/lang/mutable/MutableByte.java
@@ -107,6 +107,7 @@
*
* @return the numeric value represented by this object after conversion to type byte.
*/
+ @Override
public byte byteValue() {
return value;
}
@@ -116,6 +117,7 @@
*
* @return the numeric value represented by this object after conversion to type int.
*/
+ @Override
public int intValue() {
return value;
}
@@ -125,6 +127,7 @@
*
* @return the numeric value represented by this object after conversion to type long.
*/
+ @Override
public long longValue() {
return value;
}
@@ -134,6 +137,7 @@
*
* @return the numeric value represented by this object after conversion to type float.
*/
+ @Override
public float floatValue() {
return value;
}
@@ -143,6 +147,7 @@
*
* @return the numeric value represented by this object after conversion to type double.
*/
+ @Override
public double doubleValue() {
return value;
}
@@ -239,6 +244,7 @@
* the object to compare with.
* @return <code>true</code> if the objects are the same; <code>false</code> otherwise.
*/
+ @Override
public boolean equals(Object obj) {
if (obj instanceof MutableByte) {
return value == ((MutableByte) obj).byteValue();
@@ -251,6 +257,7 @@
*
* @return a suitable hashcode
*/
+ @Override
public int hashCode() {
return value;
}
@@ -274,6 +281,7 @@
*
* @return the mutable value as a string
*/
+ @Override
public String toString() {
return String.valueOf(value);
}
diff --git a/src/java/org/apache/commons/lang/mutable/MutableDouble.java b/src/java/org/apache/commons/lang/mutable/MutableDouble.java
index f18a506..1522581 100644
--- a/src/java/org/apache/commons/lang/mutable/MutableDouble.java
+++ b/src/java/org/apache/commons/lang/mutable/MutableDouble.java
@@ -109,6 +109,7 @@
*
* @return the numeric value represented by this object after conversion to type int.
*/
+ @Override
public int intValue() {
return (int) value;
}
@@ -118,6 +119,7 @@
*
* @return the numeric value represented by this object after conversion to type long.
*/
+ @Override
public long longValue() {
return (long) value;
}
@@ -127,6 +129,7 @@
*
* @return the numeric value represented by this object after conversion to type float.
*/
+ @Override
public float floatValue() {
return (float) value;
}
@@ -136,6 +139,7 @@
*
* @return the numeric value represented by this object after conversion to type double.
*/
+ @Override
public double doubleValue() {
return value;
}
@@ -271,6 +275,7 @@
* the object to compare with.
* @return <code>true</code> if the objects are the same; <code>false</code> otherwise.
*/
+ @Override
public boolean equals(Object obj) {
return (obj instanceof MutableDouble)
&& (Double.doubleToLongBits(((MutableDouble) obj).value) == Double.doubleToLongBits(value));
@@ -281,6 +286,7 @@
*
* @return a suitable hashcode
*/
+ @Override
public int hashCode() {
long bits = Double.doubleToLongBits(value);
return (int) (bits ^ (bits >>> 32));
@@ -305,6 +311,7 @@
*
* @return the mutable value as a string
*/
+ @Override
public String toString() {
return String.valueOf(value);
}
diff --git a/src/java/org/apache/commons/lang/mutable/MutableFloat.java b/src/java/org/apache/commons/lang/mutable/MutableFloat.java
index caf086e..7af395f 100644
--- a/src/java/org/apache/commons/lang/mutable/MutableFloat.java
+++ b/src/java/org/apache/commons/lang/mutable/MutableFloat.java
@@ -181,6 +181,7 @@
*
* @return the numeric value represented by this object after conversion to type int.
*/
+ @Override
public int intValue() {
return (int) value;
}
@@ -190,6 +191,7 @@
*
* @return the numeric value represented by this object after conversion to type long.
*/
+ @Override
public long longValue() {
return (long) value;
}
@@ -199,6 +201,7 @@
*
* @return the numeric value represented by this object after conversion to type float.
*/
+ @Override
public float floatValue() {
return value;
}
@@ -208,6 +211,7 @@
*
* @return the numeric value represented by this object after conversion to type double.
*/
+ @Override
public double doubleValue() {
return value;
}
@@ -273,6 +277,7 @@
* @return <code>true</code> if the objects are the same; <code>false</code> otherwise.
* @see java.lang.Float#floatToIntBits(float)
*/
+ @Override
public boolean equals(Object obj) {
return (obj instanceof MutableFloat)
&& (Float.floatToIntBits(((MutableFloat) obj).value) == Float.floatToIntBits(value));
@@ -284,6 +289,7 @@
*
* @return a suitable hashcode
*/
+ @Override
public int hashCode() {
return Float.floatToIntBits(value);
}
@@ -306,6 +312,7 @@
*
* @return the mutable value as a string
*/
+ @Override
public String toString() {
return String.valueOf(value);
}
diff --git a/src/java/org/apache/commons/lang/mutable/MutableInt.java b/src/java/org/apache/commons/lang/mutable/MutableInt.java
index 8525d9c..3a63860 100644
--- a/src/java/org/apache/commons/lang/mutable/MutableInt.java
+++ b/src/java/org/apache/commons/lang/mutable/MutableInt.java
@@ -179,6 +179,7 @@
*
* @return the numeric value represented by this object after conversion to type int.
*/
+ @Override
public int intValue() {
return value;
}
@@ -188,6 +189,7 @@
*
* @return the numeric value represented by this object after conversion to type long.
*/
+ @Override
public long longValue() {
return value;
}
@@ -197,6 +199,7 @@
*
* @return the numeric value represented by this object after conversion to type float.
*/
+ @Override
public float floatValue() {
return value;
}
@@ -206,6 +209,7 @@
*
* @return the numeric value represented by this object after conversion to type double.
*/
+ @Override
public double doubleValue() {
return value;
}
@@ -230,6 +234,7 @@
* the object to compare with.
* @return <code>true</code> if the objects are the same; <code>false</code> otherwise.
*/
+ @Override
public boolean equals(Object obj) {
if (obj instanceof MutableInt) {
return value == ((MutableInt) obj).intValue();
@@ -242,6 +247,7 @@
*
* @return a suitable hashcode
*/
+ @Override
public int hashCode() {
return value;
}
@@ -265,6 +271,7 @@
*
* @return the mutable value as a string
*/
+ @Override
public String toString() {
return String.valueOf(value);
}
diff --git a/src/java/org/apache/commons/lang/mutable/MutableLong.java b/src/java/org/apache/commons/lang/mutable/MutableLong.java
index ebc9d5d..460370b 100644
--- a/src/java/org/apache/commons/lang/mutable/MutableLong.java
+++ b/src/java/org/apache/commons/lang/mutable/MutableLong.java
@@ -179,6 +179,7 @@
*
* @return the numeric value represented by this object after conversion to type int.
*/
+ @Override
public int intValue() {
return (int) value;
}
@@ -188,6 +189,7 @@
*
* @return the numeric value represented by this object after conversion to type long.
*/
+ @Override
public long longValue() {
return value;
}
@@ -197,6 +199,7 @@
*
* @return the numeric value represented by this object after conversion to type float.
*/
+ @Override
public float floatValue() {
return value;
}
@@ -206,6 +209,7 @@
*
* @return the numeric value represented by this object after conversion to type double.
*/
+ @Override
public double doubleValue() {
return value;
}
@@ -230,6 +234,7 @@
* the object to compare with.
* @return <code>true</code> if the objects are the same; <code>false</code> otherwise.
*/
+ @Override
public boolean equals(Object obj) {
if (obj instanceof MutableLong) {
return value == ((MutableLong) obj).longValue();
@@ -242,6 +247,7 @@
*
* @return a suitable hashcode
*/
+ @Override
public int hashCode() {
return (int) (value ^ (value >>> 32));
}
@@ -265,6 +271,7 @@
*
* @return the mutable value as a string
*/
+ @Override
public String toString() {
return String.valueOf(value);
}
diff --git a/src/java/org/apache/commons/lang/mutable/MutableObject.java b/src/java/org/apache/commons/lang/mutable/MutableObject.java
index e08fcb0..38ccdf9 100644
--- a/src/java/org/apache/commons/lang/mutable/MutableObject.java
+++ b/src/java/org/apache/commons/lang/mutable/MutableObject.java
@@ -85,6 +85,7 @@
* the object to compare with.
* @return <code>true</code> if the objects are the same; <code>false</code> otherwise.
*/
+ @Override
public boolean equals(Object obj) {
if (obj instanceof MutableObject) {
Object other = ((MutableObject) obj).value;
@@ -98,6 +99,7 @@
*
* @return the value's hash code or <code>0</code> if the value is <code>null</code>.
*/
+ @Override
public int hashCode() {
return value == null ? 0 : value.hashCode();
}
@@ -107,6 +109,7 @@
*
* @return the mutable value as a string
*/
+ @Override
public String toString() {
return value == null ? "null" : value.toString();
}
diff --git a/src/java/org/apache/commons/lang/mutable/MutableShort.java b/src/java/org/apache/commons/lang/mutable/MutableShort.java
index cd85889..8427b38 100644
--- a/src/java/org/apache/commons/lang/mutable/MutableShort.java
+++ b/src/java/org/apache/commons/lang/mutable/MutableShort.java
@@ -179,6 +179,7 @@
*
* @return the numeric value represented by this object after conversion to type short.
*/
+ @Override
public short shortValue() {
return value;
}
@@ -188,6 +189,7 @@
*
* @return the numeric value represented by this object after conversion to type int.
*/
+ @Override
public int intValue() {
return value;
}
@@ -197,6 +199,7 @@
*
* @return the numeric value represented by this object after conversion to type long.
*/
+ @Override
public long longValue() {
return value;
}
@@ -206,6 +209,7 @@
*
* @return the numeric value represented by this object after conversion to type float.
*/
+ @Override
public float floatValue() {
return value;
}
@@ -215,6 +219,7 @@
*
* @return the numeric value represented by this object after conversion to type double.
*/
+ @Override
public double doubleValue() {
return value;
}
@@ -239,6 +244,7 @@
* the object to compare with.
* @return <code>true</code> if the objects are the same; <code>false</code> otherwise.
*/
+ @Override
public boolean equals(Object obj) {
if (obj instanceof MutableShort) {
return value == ((MutableShort) obj).shortValue();
@@ -251,6 +257,7 @@
*
* @return a suitable hashcode
*/
+ @Override
public int hashCode() {
return value;
}
@@ -274,6 +281,7 @@
*
* @return the mutable value as a string
*/
+ @Override
public String toString() {
return String.valueOf(value);
}
diff --git a/src/java/org/apache/commons/lang/text/CompositeFormat.java b/src/java/org/apache/commons/lang/text/CompositeFormat.java
index 93dd188..23a41e0 100644
--- a/src/java/org/apache/commons/lang/text/CompositeFormat.java
+++ b/src/java/org/apache/commons/lang/text/CompositeFormat.java
@@ -64,6 +64,7 @@
* @return <code>toAppendTo</code>
* @see Format#format(Object, StringBuffer, FieldPosition)
*/
+ @Override
public StringBuffer format(Object obj, StringBuffer toAppendTo,
FieldPosition pos) {
return formatter.format(obj, toAppendTo, pos);
@@ -79,6 +80,7 @@
* @return the parsed Object
* @see Format#parseObject(String, ParsePosition)
*/
+ @Override
public Object parseObject(String source, ParsePosition pos) {
return parser.parseObject(source, pos);
}
diff --git a/src/java/org/apache/commons/lang/text/ExtendedMessageFormat.java b/src/java/org/apache/commons/lang/text/ExtendedMessageFormat.java
index 4af3955..4e76106 100644
--- a/src/java/org/apache/commons/lang/text/ExtendedMessageFormat.java
+++ b/src/java/org/apache/commons/lang/text/ExtendedMessageFormat.java
@@ -130,6 +130,7 @@
/**
* {@inheritDoc}
*/
+ @Override
public String toPattern() {
return toPattern;
}
@@ -139,6 +140,7 @@
*
* @param pattern String
*/
+ @Override
public final void applyPattern(String pattern) {
if (registry == null) {
super.applyPattern(pattern);
@@ -209,6 +211,7 @@
* {@inheritDoc}
* @throws UnsupportedOperationException
*/
+ @Override
public void setFormat(int formatElementIndex, Format newFormat) {
throw new UnsupportedOperationException();
}
@@ -217,6 +220,7 @@
* {@inheritDoc}
* @throws UnsupportedOperationException
*/
+ @Override
public void setFormatByArgumentIndex(int argumentIndex, Format newFormat) {
throw new UnsupportedOperationException();
}
@@ -225,6 +229,7 @@
* {@inheritDoc}
* @throws UnsupportedOperationException
*/
+ @Override
public void setFormats(Format[] newFormats) {
throw new UnsupportedOperationException();
}
@@ -233,6 +238,7 @@
* {@inheritDoc}
* @throws UnsupportedOperationException
*/
+ @Override
public void setFormatsByArgumentIndex(Format[] newFormats) {
throw new UnsupportedOperationException();
}
diff --git a/src/java/org/apache/commons/lang/text/StrBuilder.java b/src/java/org/apache/commons/lang/text/StrBuilder.java
index bf19b81..c687896 100644
--- a/src/java/org/apache/commons/lang/text/StrBuilder.java
+++ b/src/java/org/apache/commons/lang/text/StrBuilder.java
@@ -2480,6 +2480,7 @@
* @param obj the object to check, null returns false
* @return true if the builders contain the same characters in the same order
*/
+ @Override
public boolean equals(Object obj) {
if (obj instanceof StrBuilder) {
return equals((StrBuilder) obj);
@@ -2492,6 +2493,7 @@
*
* @return a hash code
*/
+ @Override
public int hashCode() {
char buf[] = buffer;
int hash = 0;
@@ -2511,6 +2513,7 @@
*
* @return the builder as a String
*/
+ @Override
public String toString() {
return new String(buffer, 0, size);
}
@@ -2572,6 +2575,7 @@
}
/** {@inheritDoc} */
+ @Override
protected List tokenize(char[] chars, int offset, int count) {
if (chars == null) {
return super.tokenize(StrBuilder.this.buffer, 0, StrBuilder.this.size());
@@ -2581,6 +2585,7 @@
}
/** {@inheritDoc} */
+ @Override
public String getContent() {
String str = super.getContent();
if (str == null) {
@@ -2607,11 +2612,13 @@
}
/** {@inheritDoc} */
+ @Override
public void close() {
// do nothing
}
/** {@inheritDoc} */
+ @Override
public int read() {
if (ready() == false) {
return -1;
@@ -2620,6 +2627,7 @@
}
/** {@inheritDoc} */
+ @Override
public int read(char b[], int off, int len) {
if (off < 0 || len < 0 || off > b.length ||
(off + len) > b.length || (off + len) < 0) {
@@ -2640,6 +2648,7 @@
}
/** {@inheritDoc} */
+ @Override
public long skip(long n) {
if (pos + n > StrBuilder.this.size()) {
n = StrBuilder.this.size() - pos;
@@ -2652,21 +2661,25 @@
}
/** {@inheritDoc} */
+ @Override
public boolean ready() {
return pos < StrBuilder.this.size();
}
/** {@inheritDoc} */
+ @Override
public boolean markSupported() {
return true;
}
/** {@inheritDoc} */
+ @Override
public void mark(int readAheadLimit) {
mark = pos;
}
/** {@inheritDoc} */
+ @Override
public void reset() {
pos = mark;
}
@@ -2684,36 +2697,43 @@
}
/** {@inheritDoc} */
+ @Override
public void close() {
// do nothing
}
/** {@inheritDoc} */
+ @Override
public void flush() {
// do nothing
}
/** {@inheritDoc} */
+ @Override
public void write(int c) {
StrBuilder.this.append((char) c);
}
/** {@inheritDoc} */
+ @Override
public void write(char[] cbuf) {
StrBuilder.this.append(cbuf);
}
/** {@inheritDoc} */
+ @Override
public void write(char[] cbuf, int off, int len) {
StrBuilder.this.append(cbuf, off, len);
}
/** {@inheritDoc} */
+ @Override
public void write(String str) {
StrBuilder.this.append(str);
}
/** {@inheritDoc} */
+ @Override
public void write(String str, int off, int len) {
StrBuilder.this.append(str, off, len);
}
diff --git a/src/java/org/apache/commons/lang/text/StrLookup.java b/src/java/org/apache/commons/lang/text/StrLookup.java
index 145190b..f28a81c 100644
--- a/src/java/org/apache/commons/lang/text/StrLookup.java
+++ b/src/java/org/apache/commons/lang/text/StrLookup.java
@@ -147,6 +147,7 @@
* @param key the key to be looked up, may be null
* @return the matching value, null if no match
*/
+ @Override
public String lookup(String key) {
if (map == null) {
return null;
diff --git a/src/java/org/apache/commons/lang/text/StrMatcher.java b/src/java/org/apache/commons/lang/text/StrMatcher.java
index 051aa47..cb939ba 100644
--- a/src/java/org/apache/commons/lang/text/StrMatcher.java
+++ b/src/java/org/apache/commons/lang/text/StrMatcher.java
@@ -295,6 +295,7 @@
* @param bufferEnd the end index of the active buffer, valid for buffer
* @return the number of matching characters, zero for no match
*/
+ @Override
public int isMatch(char[] buffer, int pos, int bufferStart, int bufferEnd) {
return Arrays.binarySearch(chars, buffer[pos]) >= 0 ? 1 : 0;
}
@@ -327,6 +328,7 @@
* @param bufferEnd the end index of the active buffer, valid for buffer
* @return the number of matching characters, zero for no match
*/
+ @Override
public int isMatch(char[] buffer, int pos, int bufferStart, int bufferEnd) {
return ch == buffer[pos] ? 1 : 0;
}
@@ -359,6 +361,7 @@
* @param bufferEnd the end index of the active buffer, valid for buffer
* @return the number of matching characters, zero for no match
*/
+ @Override
public int isMatch(char[] buffer, int pos, int bufferStart, int bufferEnd) {
int len = chars.length;
if (pos + len > bufferEnd) {
@@ -395,6 +398,7 @@
* @param bufferEnd the end index of the active buffer, valid for buffer
* @return the number of matching characters, zero for no match
*/
+ @Override
public int isMatch(char[] buffer, int pos, int bufferStart, int bufferEnd) {
return 0;
}
@@ -422,6 +426,7 @@
* @param bufferEnd the end index of the active buffer, valid for buffer
* @return the number of matching characters, zero for no match
*/
+ @Override
public int isMatch(char[] buffer, int pos, int bufferStart, int bufferEnd) {
return buffer[pos] <= 32 ? 1 : 0;
}
diff --git a/src/java/org/apache/commons/lang/text/StrTokenizer.java b/src/java/org/apache/commons/lang/text/StrTokenizer.java
index a5947ca..8c78e88 100644
--- a/src/java/org/apache/commons/lang/text/StrTokenizer.java
+++ b/src/java/org/apache/commons/lang/text/StrTokenizer.java
@@ -1083,6 +1083,7 @@
*
* @return a new instance of this Tokenizer which has been reset.
*/
+ @Override
public Object clone() {
try {
return cloneReset();
@@ -1114,6 +1115,7 @@
*
* @return the string content being parsed
*/
+ @Override
public String toString() {
if (tokens == null) {
return "StrTokenizer[not tokenized yet]";
diff --git a/src/java/org/apache/commons/lang/time/DurationFormatUtils.java b/src/java/org/apache/commons/lang/time/DurationFormatUtils.java
index d731e6c..cfb2b67 100644
--- a/src/java/org/apache/commons/lang/time/DurationFormatUtils.java
+++ b/src/java/org/apache/commons/lang/time/DurationFormatUtils.java
@@ -621,6 +621,7 @@
* @param obj2 Object to consider equality of
* @return boolean <code>true</code> if equal
*/
+ @Override
public boolean equals(Object obj2) {
if (obj2 instanceof Token) {
Token tok2 = (Token) obj2;
@@ -648,6 +649,7 @@
*
* @return The hashcode for the token
*/
+ @Override
public int hashCode() {
return this.value.hashCode();
}
@@ -657,6 +659,7 @@
*
* @return String representation of the token
*/
+ @Override
public String toString() {
return StringUtils.repeat(this.value.toString(), this.count);
}
diff --git a/src/java/org/apache/commons/lang/time/FastDateFormat.java b/src/java/org/apache/commons/lang/time/FastDateFormat.java
index d2a0f3c..62568b3 100644
--- a/src/java/org/apache/commons/lang/time/FastDateFormat.java
+++ b/src/java/org/apache/commons/lang/time/FastDateFormat.java
@@ -784,6 +784,7 @@
* @param pos the position - ignored
* @return the buffer passed in
*/
+ @Override
public StringBuffer format(Object obj, StringBuffer toAppendTo, FieldPosition pos) {
if (obj instanceof Date) {
return format((Date) obj, toAppendTo);
@@ -899,6 +900,7 @@
* @param pos the parsing position
* @return <code>null</code> as not supported
*/
+ @Override
public Object parseObject(String source, ParsePosition pos) {
pos.setIndex(0);
pos.setErrorIndex(0);
@@ -971,6 +973,7 @@
* @param obj the object to compare to
* @return <code>true</code> if equal
*/
+ @Override
public boolean equals(Object obj) {
if (obj instanceof FastDateFormat == false) {
return false;
@@ -993,6 +996,7 @@
*
* @return a hashcode compatible with equals
*/
+ @Override
public int hashCode() {
int total = 0;
total += mPattern.hashCode();
@@ -1008,6 +1012,7 @@
*
* @return a debugging string
*/
+ @Override
public String toString() {
return "FastDateFormat[" + mPattern + "]";
}
@@ -1663,6 +1668,7 @@
/**
* {@inheritDoc}
*/
+ @Override
public int hashCode() {
return mStyle * 31 + mLocale.hashCode();
}
@@ -1670,6 +1676,7 @@
/**
* {@inheritDoc}
*/
+ @Override
public boolean equals(Object obj) {
if (this == obj) {
return true;
@@ -1709,6 +1716,7 @@
/**
* {@inheritDoc}
*/
+ @Override
public boolean equals(Object obj) {
if (this == obj) {
return true;
@@ -1730,6 +1738,7 @@
/**
* {@inheritDoc}
*/
+ @Override
public int hashCode() {
return
(mObj1 == null ? 0 : mObj1.hashCode()) +
@@ -1739,6 +1748,7 @@
/**
* {@inheritDoc}
*/
+ @Override
public String toString() {
return "[" + mObj1 + ':' + mObj2 + ']';
}
diff --git a/src/java/org/apache/commons/lang/time/StopWatch.java b/src/java/org/apache/commons/lang/time/StopWatch.java
index de9193c..8276918 100644
--- a/src/java/org/apache/commons/lang/time/StopWatch.java
+++ b/src/java/org/apache/commons/lang/time/StopWatch.java
@@ -357,6 +357,7 @@
*
* @return the time as a String
*/
+ @Override
public String toString() {
return DurationFormatUtils.formatDurationHMS(getTime());
}
diff --git a/src/test/org/apache/commons/lang/ArrayUtilsTest.java b/src/test/org/apache/commons/lang/ArrayUtilsTest.java
index a7a2597..2be3f8d 100644
--- a/src/test/org/apache/commons/lang/ArrayUtilsTest.java
+++ b/src/test/org/apache/commons/lang/ArrayUtilsTest.java
@@ -57,10 +57,12 @@
return suite;
}
+ @Override
protected void setUp() throws Exception {
super.setUp();
}
+ @Override
protected void tearDown() throws Exception {
super.tearDown();
}
@@ -197,9 +199,11 @@
public Object setValue(Object value) {
throw new UnsupportedOperationException();
}
+ @Override
public boolean equals(Object o) {
throw new UnsupportedOperationException();
}
+ @Override
public int hashCode() {
throw new UnsupportedOperationException();
}
diff --git a/src/test/org/apache/commons/lang/text/StrBuilderAppendInsertTest.java b/src/test/org/apache/commons/lang/text/StrBuilderAppendInsertTest.java
index 646cc5a..a03adee 100644
--- a/src/test/org/apache/commons/lang/text/StrBuilderAppendInsertTest.java
+++ b/src/test/org/apache/commons/lang/text/StrBuilderAppendInsertTest.java
@@ -41,6 +41,7 @@
/** Test subclass of Object, with a toString method. */
private static Object FOO = new Object() {
+ @Override
public String toString() {
return "foo";
}
@@ -486,10 +487,12 @@
public void testAppendln_String() {
final int[] count = new int[2];
StrBuilder sb = new StrBuilder() {
+ @Override
public StrBuilder append(String str) {
count[0]++;
return super.append(str);
}
+ @Override
public StrBuilder appendNewLine() {
count[1]++;
return super.appendNewLine();
@@ -505,10 +508,12 @@
public void testAppendln_String_int_int() {
final int[] count = new int[2];
StrBuilder sb = new StrBuilder() {
+ @Override
public StrBuilder append(String str, int startIndex, int length) {
count[0]++;
return super.append(str, startIndex, length);
}
+ @Override
public StrBuilder appendNewLine() {
count[1]++;
return super.appendNewLine();
@@ -524,10 +529,12 @@
public void testAppendln_StringBuffer() {
final int[] count = new int[2];
StrBuilder sb = new StrBuilder() {
+ @Override
public StrBuilder append(StringBuffer str) {
count[0]++;
return super.append(str);
}
+ @Override
public StrBuilder appendNewLine() {
count[1]++;
return super.appendNewLine();
@@ -543,10 +550,12 @@
public void testAppendln_StringBuffer_int_int() {
final int[] count = new int[2];
StrBuilder sb = new StrBuilder() {
+ @Override
public StrBuilder append(StringBuffer str, int startIndex, int length) {
count[0]++;
return super.append(str, startIndex, length);
}
+ @Override
public StrBuilder appendNewLine() {
count[1]++;
return super.appendNewLine();
@@ -562,10 +571,12 @@
public void testAppendln_StrBuilder() {
final int[] count = new int[2];
StrBuilder sb = new StrBuilder() {
+ @Override
public StrBuilder append(StrBuilder str) {
count[0]++;
return super.append(str);
}
+ @Override
public StrBuilder appendNewLine() {
count[1]++;
return super.appendNewLine();
@@ -581,10 +592,12 @@
public void testAppendln_StrBuilder_int_int() {
final int[] count = new int[2];
StrBuilder sb = new StrBuilder() {
+ @Override
public StrBuilder append(StrBuilder str, int startIndex, int length) {
count[0]++;
return super.append(str, startIndex, length);
}
+ @Override
public StrBuilder appendNewLine() {
count[1]++;
return super.appendNewLine();
@@ -600,10 +613,12 @@
public void testAppendln_CharArray() {
final int[] count = new int[2];
StrBuilder sb = new StrBuilder() {
+ @Override
public StrBuilder append(char[] str) {
count[0]++;
return super.append(str);
}
+ @Override
public StrBuilder appendNewLine() {
count[1]++;
return super.appendNewLine();
@@ -619,10 +634,12 @@
public void testAppendln_CharArray_int_int() {
final int[] count = new int[2];
StrBuilder sb = new StrBuilder() {
+ @Override
public StrBuilder append(char[] str, int startIndex, int length) {
count[0]++;
return super.append(str, startIndex, length);
}
+ @Override
public StrBuilder appendNewLine() {
count[1]++;
return super.appendNewLine();