commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mben...@apache.org
Subject svn commit: r1439140 - in /commons/proper/functor/branches/FUNCTOR-14-mm/core/src: main/java/org/apache/commons/functor/generator/range/ test/java/org/apache/commons/functor/generator/range/
Date Sun, 27 Jan 2013 19:15:35 GMT
Author: mbenson
Date: Sun Jan 27 19:15:34 2013
New Revision: 1439140

URL: http://svn.apache.org/viewvc?rev=1439140&view=rev
Log:
tighten comparable

Modified:
    commons/proper/functor/branches/FUNCTOR-14-mm/core/src/main/java/org/apache/commons/functor/generator/range/Endpoint.java
    commons/proper/functor/branches/FUNCTOR-14-mm/core/src/main/java/org/apache/commons/functor/generator/range/Range.java
    commons/proper/functor/branches/FUNCTOR-14-mm/core/src/test/java/org/apache/commons/functor/generator/range/TestCharacterRange.java
    commons/proper/functor/branches/FUNCTOR-14-mm/core/src/test/java/org/apache/commons/functor/generator/range/TestDoubleRange.java
    commons/proper/functor/branches/FUNCTOR-14-mm/core/src/test/java/org/apache/commons/functor/generator/range/TestFloatRange.java
    commons/proper/functor/branches/FUNCTOR-14-mm/core/src/test/java/org/apache/commons/functor/generator/range/TestIntegerRange.java
    commons/proper/functor/branches/FUNCTOR-14-mm/core/src/test/java/org/apache/commons/functor/generator/range/TestLongRange.java

Modified: commons/proper/functor/branches/FUNCTOR-14-mm/core/src/main/java/org/apache/commons/functor/generator/range/Endpoint.java
URL: http://svn.apache.org/viewvc/commons/proper/functor/branches/FUNCTOR-14-mm/core/src/main/java/org/apache/commons/functor/generator/range/Endpoint.java?rev=1439140&r1=1439139&r2=1439140&view=diff
==============================================================================
--- commons/proper/functor/branches/FUNCTOR-14-mm/core/src/main/java/org/apache/commons/functor/generator/range/Endpoint.java
(original)
+++ commons/proper/functor/branches/FUNCTOR-14-mm/core/src/main/java/org/apache/commons/functor/generator/range/Endpoint.java
Sun Jan 27 19:15:34 2013
@@ -26,7 +26,7 @@ package org.apache.commons.functor.gener
  * @since 1.0
  * @version $Revision: $ $Date: $
  */
-public class Endpoint<T extends Comparable<?>> {
+public class Endpoint<T extends Comparable<T>> {
 
     /**
      * The endpoint value.

Modified: commons/proper/functor/branches/FUNCTOR-14-mm/core/src/main/java/org/apache/commons/functor/generator/range/Range.java
URL: http://svn.apache.org/viewvc/commons/proper/functor/branches/FUNCTOR-14-mm/core/src/main/java/org/apache/commons/functor/generator/range/Range.java?rev=1439140&r1=1439139&r2=1439140&view=diff
==============================================================================
--- commons/proper/functor/branches/FUNCTOR-14-mm/core/src/main/java/org/apache/commons/functor/generator/range/Range.java
(original)
+++ commons/proper/functor/branches/FUNCTOR-14-mm/core/src/main/java/org/apache/commons/functor/generator/range/Range.java
Sun Jan 27 19:15:34 2013
@@ -33,7 +33,7 @@ import java.util.Collection;
  * @since 1.0
  * @version $Revision: $ $Date: $
  */
-public interface Range<T extends Comparable<?>, S extends Comparable<?>>
{
+public interface Range<T extends Comparable<T>, S extends Comparable<?>>
{
 
     /**
      * Default left bound type.

Modified: commons/proper/functor/branches/FUNCTOR-14-mm/core/src/test/java/org/apache/commons/functor/generator/range/TestCharacterRange.java
URL: http://svn.apache.org/viewvc/commons/proper/functor/branches/FUNCTOR-14-mm/core/src/test/java/org/apache/commons/functor/generator/range/TestCharacterRange.java?rev=1439140&r1=1439139&r2=1439140&view=diff
==============================================================================
--- commons/proper/functor/branches/FUNCTOR-14-mm/core/src/test/java/org/apache/commons/functor/generator/range/TestCharacterRange.java
(original)
+++ commons/proper/functor/branches/FUNCTOR-14-mm/core/src/test/java/org/apache/commons/functor/generator/range/TestCharacterRange.java
Sun Jan 27 19:15:34 2013
@@ -166,9 +166,9 @@ public class TestCharacterRange extends 
     @Test
     public void testBoundaries() {
         CharacterRange range = Ranges.characterRange('b', 'l');
-        assertEquals(new Endpoint<Comparable<?>>('b', BoundType.CLOSED),
+        assertEquals(new Endpoint<Character>('b', BoundType.CLOSED),
                      range.getLeftEndpoint());
-        assertEquals(new Endpoint<Comparable<?>>('l', BoundType.CLOSED),
+        assertEquals(new Endpoint<Character>('l', BoundType.CLOSED),
                      range.getRightEndpoint());
     }
 

Modified: commons/proper/functor/branches/FUNCTOR-14-mm/core/src/test/java/org/apache/commons/functor/generator/range/TestDoubleRange.java
URL: http://svn.apache.org/viewvc/commons/proper/functor/branches/FUNCTOR-14-mm/core/src/test/java/org/apache/commons/functor/generator/range/TestDoubleRange.java?rev=1439140&r1=1439139&r2=1439140&view=diff
==============================================================================
--- commons/proper/functor/branches/FUNCTOR-14-mm/core/src/test/java/org/apache/commons/functor/generator/range/TestDoubleRange.java
(original)
+++ commons/proper/functor/branches/FUNCTOR-14-mm/core/src/test/java/org/apache/commons/functor/generator/range/TestDoubleRange.java
Sun Jan 27 19:15:34 2013
@@ -209,9 +209,9 @@ public class TestDoubleRange extends Bas
     @Test
     public void testBoundaries() {
         DoubleRange range = Ranges.doubleRange(0.0d, 10.0d);
-        assertEquals(new Endpoint<Comparable<?>>(0.0d, BoundType.CLOSED),
+        assertEquals(new Endpoint<Double>(0.0d, BoundType.CLOSED),
                      range.getLeftEndpoint());
-        assertEquals(new Endpoint<Comparable<?>>(10.0d, BoundType.OPEN),
+        assertEquals(new Endpoint<Double>(10.0d, BoundType.OPEN),
                      range.getRightEndpoint());
     }
 

Modified: commons/proper/functor/branches/FUNCTOR-14-mm/core/src/test/java/org/apache/commons/functor/generator/range/TestFloatRange.java
URL: http://svn.apache.org/viewvc/commons/proper/functor/branches/FUNCTOR-14-mm/core/src/test/java/org/apache/commons/functor/generator/range/TestFloatRange.java?rev=1439140&r1=1439139&r2=1439140&view=diff
==============================================================================
--- commons/proper/functor/branches/FUNCTOR-14-mm/core/src/test/java/org/apache/commons/functor/generator/range/TestFloatRange.java
(original)
+++ commons/proper/functor/branches/FUNCTOR-14-mm/core/src/test/java/org/apache/commons/functor/generator/range/TestFloatRange.java
Sun Jan 27 19:15:34 2013
@@ -413,9 +413,9 @@ public class TestFloatRange extends Base
     @Test
     public void testBoundaries() {
         FloatRange range = Ranges.floatRange(0.0f, 10.0f);
-        assertEquals(new Endpoint<Comparable<?>>(0.0f, BoundType.CLOSED),
+        assertEquals(new Endpoint<Float>(0.0f, BoundType.CLOSED),
                      range.getLeftEndpoint());
-        assertEquals(new Endpoint<Comparable<?>>(10.0f, BoundType.OPEN),
+        assertEquals(new Endpoint<Float>(10.0f, BoundType.OPEN),
                      range.getRightEndpoint());
     }
 

Modified: commons/proper/functor/branches/FUNCTOR-14-mm/core/src/test/java/org/apache/commons/functor/generator/range/TestIntegerRange.java
URL: http://svn.apache.org/viewvc/commons/proper/functor/branches/FUNCTOR-14-mm/core/src/test/java/org/apache/commons/functor/generator/range/TestIntegerRange.java?rev=1439140&r1=1439139&r2=1439140&view=diff
==============================================================================
--- commons/proper/functor/branches/FUNCTOR-14-mm/core/src/test/java/org/apache/commons/functor/generator/range/TestIntegerRange.java
(original)
+++ commons/proper/functor/branches/FUNCTOR-14-mm/core/src/test/java/org/apache/commons/functor/generator/range/TestIntegerRange.java
Sun Jan 27 19:15:34 2013
@@ -174,9 +174,9 @@ public class TestIntegerRange extends Ba
     @Test
     public void testBoundaries() {
         IntegerRange range = Ranges.integerRange(0, 10);
-        assertEquals(new Endpoint<Comparable<?>>(0, BoundType.CLOSED),
+        assertEquals(new Endpoint<Integer>(0, BoundType.CLOSED),
                      range.getLeftEndpoint());
-        assertEquals(new Endpoint<Comparable<?>>(10, BoundType.OPEN),
+        assertEquals(new Endpoint<Integer>(10, BoundType.OPEN),
                      range.getRightEndpoint());
     }
 

Modified: commons/proper/functor/branches/FUNCTOR-14-mm/core/src/test/java/org/apache/commons/functor/generator/range/TestLongRange.java
URL: http://svn.apache.org/viewvc/commons/proper/functor/branches/FUNCTOR-14-mm/core/src/test/java/org/apache/commons/functor/generator/range/TestLongRange.java?rev=1439140&r1=1439139&r2=1439140&view=diff
==============================================================================
--- commons/proper/functor/branches/FUNCTOR-14-mm/core/src/test/java/org/apache/commons/functor/generator/range/TestLongRange.java
(original)
+++ commons/proper/functor/branches/FUNCTOR-14-mm/core/src/test/java/org/apache/commons/functor/generator/range/TestLongRange.java
Sun Jan 27 19:15:34 2013
@@ -396,9 +396,9 @@ public class TestLongRange extends BaseF
     @Test
     public void testBoundaries() {
         LongRange range = Ranges.longRange(0L, 10L);
-        assertEquals(new Endpoint<Comparable<?>>(0L, BoundType.CLOSED),
+        assertEquals(new Endpoint<Long>(0L, BoundType.CLOSED),
                      range.getLeftEndpoint());
-        assertEquals(new Endpoint<Comparable<?>>(10L, BoundType.OPEN),
+        assertEquals(new Endpoint<Long>(10L, BoundType.OPEN),
                      range.getRightEndpoint());
     }
 



Mime
View raw message