roller-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gma...@apache.org
Subject svn commit: r1551565 - in /roller/trunk/app/src/main/java/org/apache/roller: planet/pojos/ weblogger/business/themes/ weblogger/pojos/
Date Tue, 17 Dec 2013 15:11:42 GMT
Author: gmazza
Date: Tue Dec 17 15:11:42 2013
New Revision: 1551565

URL: http://svn.apache.org/r1551565
Log:
Switched to parameterized forms of Comparable

Modified:
    roller/trunk/app/src/main/java/org/apache/roller/planet/pojos/Planet.java
    roller/trunk/app/src/main/java/org/apache/roller/planet/pojos/PlanetGroup.java
    roller/trunk/app/src/main/java/org/apache/roller/planet/pojos/Subscription.java
    roller/trunk/app/src/main/java/org/apache/roller/weblogger/business/themes/SharedTheme.java
    roller/trunk/app/src/main/java/org/apache/roller/weblogger/business/themes/SharedThemeResourceFromDir.java
    roller/trunk/app/src/main/java/org/apache/roller/weblogger/pojos/WeblogBookmark.java

Modified: roller/trunk/app/src/main/java/org/apache/roller/planet/pojos/Planet.java
URL: http://svn.apache.org/viewvc/roller/trunk/app/src/main/java/org/apache/roller/planet/pojos/Planet.java?rev=1551565&r1=1551564&r2=1551565&view=diff
==============================================================================
--- roller/trunk/app/src/main/java/org/apache/roller/planet/pojos/Planet.java (original)
+++ roller/trunk/app/src/main/java/org/apache/roller/planet/pojos/Planet.java Tue Dec 17 15:11:42
2013
@@ -25,7 +25,7 @@ import java.util.TreeSet;
 /**
  * A Roller "Planet".
  */
-public class Planet implements Comparable {
+public class Planet implements Comparable<Planet> {
     
     private String id = UUIDGenerator.generateUUID();
     private String handle = null;
@@ -48,8 +48,7 @@ public class Planet implements Comparabl
     /**
      * For comparing planets and sorting, ordered by Title.
      */
-    public int compareTo(Object o) {
-        Planet other = (Planet) o;
+    public int compareTo(Planet other) {
         return getTitle().compareTo(other.getTitle());
     }
     

Modified: roller/trunk/app/src/main/java/org/apache/roller/planet/pojos/PlanetGroup.java
URL: http://svn.apache.org/viewvc/roller/trunk/app/src/main/java/org/apache/roller/planet/pojos/PlanetGroup.java?rev=1551565&r1=1551564&r2=1551565&view=diff
==============================================================================
--- roller/trunk/app/src/main/java/org/apache/roller/planet/pojos/PlanetGroup.java (original)
+++ roller/trunk/app/src/main/java/org/apache/roller/planet/pojos/PlanetGroup.java Tue Dec
17 15:11:42 2013
@@ -30,7 +30,7 @@ import org.apache.roller.weblogger.busin
 /**
  * Planet Group.
  */
-public class PlanetGroup implements Serializable, Comparable {
+public class PlanetGroup implements Serializable, Comparable<PlanetGroup> {
 
     private transient String[] catArray = null;
     
@@ -62,8 +62,7 @@ public class PlanetGroup implements Seri
     /**
      * For comparing groups and sorting, ordered by Title.
      */
-    public int compareTo(Object o) {
-        PlanetGroup other = (PlanetGroup) o;
+    public int compareTo(PlanetGroup other) {
         return getTitle().compareTo(other.getTitle());
     }
     

Modified: roller/trunk/app/src/main/java/org/apache/roller/planet/pojos/Subscription.java
URL: http://svn.apache.org/viewvc/roller/trunk/app/src/main/java/org/apache/roller/planet/pojos/Subscription.java?rev=1551565&r1=1551564&r2=1551565&view=diff
==============================================================================
--- roller/trunk/app/src/main/java/org/apache/roller/planet/pojos/Subscription.java (original)
+++ roller/trunk/app/src/main/java/org/apache/roller/planet/pojos/Subscription.java Tue Dec
17 15:11:42 2013
@@ -27,7 +27,7 @@ import org.apache.roller.util.UUIDGenera
 /**
  * Planet Subscription.
  */
-public class Subscription implements Serializable, Comparable {
+public class Subscription implements Serializable, Comparable<Subscription> {
     
     // attributes
     private String id = UUIDGenerator.generateUUID();
@@ -51,8 +51,7 @@ public class Subscription implements Ser
      * This ensures that feeds are sorted by title, but that identical titles 
      * don't make feeds equal.
      */
-    public int compareTo(Object o) {
-        Subscription other = (Subscription) o;
+    public int compareTo(Subscription other) {
         String otherString = other.getTitle() + other.getFeedURL();
         String thisString = getTitle() + getFeedURL();
         return thisString.compareTo(otherString);

Modified: roller/trunk/app/src/main/java/org/apache/roller/weblogger/business/themes/SharedTheme.java
URL: http://svn.apache.org/viewvc/roller/trunk/app/src/main/java/org/apache/roller/weblogger/business/themes/SharedTheme.java?rev=1551565&r1=1551564&r2=1551565&view=diff
==============================================================================
--- roller/trunk/app/src/main/java/org/apache/roller/weblogger/business/themes/SharedTheme.java
(original)
+++ roller/trunk/app/src/main/java/org/apache/roller/weblogger/business/themes/SharedTheme.java
Tue Dec 17 15:11:42 2013
@@ -30,7 +30,7 @@ import java.util.List;
  * A SharedTheme is a theme implementation which is designed to be shared by
  * multiple weblogs using a common set of resources.
  */
-public abstract class SharedTheme implements Theme, Serializable, Comparable {
+public abstract class SharedTheme implements Theme, Serializable, Comparable<SharedTheme>
{
     
     protected String id = null;
     protected String name = null;
@@ -48,8 +48,7 @@ public abstract class SharedTheme implem
     /**
      * @see java.lang.Comparable#compareTo(java.lang.Object)
      */
-    public int compareTo(Object o) {
-        SharedTheme other = (SharedTheme) o;
+    public int compareTo(SharedTheme other) {
         return getName().compareTo(other.getName());
     }
     

Modified: roller/trunk/app/src/main/java/org/apache/roller/weblogger/business/themes/SharedThemeResourceFromDir.java
URL: http://svn.apache.org/viewvc/roller/trunk/app/src/main/java/org/apache/roller/weblogger/business/themes/SharedThemeResourceFromDir.java?rev=1551565&r1=1551564&r2=1551565&view=diff
==============================================================================
--- roller/trunk/app/src/main/java/org/apache/roller/weblogger/business/themes/SharedThemeResourceFromDir.java
(original)
+++ roller/trunk/app/src/main/java/org/apache/roller/weblogger/business/themes/SharedThemeResourceFromDir.java
Tue Dec 17 15:11:42 2013
@@ -36,7 +36,7 @@ import org.apache.roller.weblogger.pojos
  * of this class.
  */
 public class SharedThemeResourceFromDir 
-        implements ThemeResource, Serializable, Comparable {
+        implements ThemeResource, Serializable, Comparable<SharedThemeResourceFromDir>
{
     
     // the physical java.io.File backing this resource
     private File resourceFile = null;
@@ -54,8 +54,7 @@ public class SharedThemeResourceFromDir 
     /**
      * @see java.lang.Comparable#compareTo(java.lang.Object)
      */
-    public int compareTo(Object o) {
-        ThemeResource other = (ThemeResource) o;
+    public int compareTo(SharedThemeResourceFromDir other) {
         return getPath().compareTo(other.getPath());
     }
     

Modified: roller/trunk/app/src/main/java/org/apache/roller/weblogger/pojos/WeblogBookmark.java
URL: http://svn.apache.org/viewvc/roller/trunk/app/src/main/java/org/apache/roller/weblogger/pojos/WeblogBookmark.java?rev=1551565&r1=1551564&r2=1551565&view=diff
==============================================================================
--- roller/trunk/app/src/main/java/org/apache/roller/weblogger/pojos/WeblogBookmark.java (original)
+++ roller/trunk/app/src/main/java/org/apache/roller/weblogger/pojos/WeblogBookmark.java Tue
Dec 17 15:11:42 2013
@@ -29,7 +29,7 @@ import org.apache.roller.util.UUIDGenera
  * Don't construct one of these yourself, instead use the create method in
  * the your BookmarkManager implementation.</p>
  */
-public class WeblogBookmark implements Serializable, Comparable {
+public class WeblogBookmark implements Serializable, Comparable<WeblogBookmark> {
     
     public static final long serialVersionUID = 2315131256728236003L;
     
@@ -207,7 +207,7 @@ public class WeblogBookmark implements S
     /**
      * @see java.lang.Comparable#compareTo(java.lang.Object)
      */
-    public int compareTo(Object o) {
+    public int compareTo(WeblogBookmark o) {
         return bookmarkComparator.compare(this, o);
     }
     



Mime
View raw message