← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 21203: Removed unused methods

 

------------------------------------------------------------
revno: 21203
committer: Lars Helge Overland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Thu 2015-11-26 20:28:25 +0100
message:
  Removed unused methods
modified:
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/common/IdentifiableObjectUtils.java


--
lp:dhis2
https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk

Your team DHIS 2 developers is subscribed to branch lp:dhis2.
To unsubscribe from this branch go to https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk/+edit-subscription
=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/common/IdentifiableObjectUtils.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/common/IdentifiableObjectUtils.java	2015-10-11 19:50:39 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/common/IdentifiableObjectUtils.java	2015-11-26 19:28:25 +0000
@@ -31,7 +31,6 @@
 import java.text.SimpleDateFormat;
 import java.util.ArrayList;
 import java.util.Collection;
-import java.util.Collections;
 import java.util.Date;
 import java.util.HashMap;
 import java.util.Iterator;
@@ -202,61 +201,6 @@
     }
 
     /**
-     * Returns a list of IdentifiableObjects.
-     *
-     * @param objects the IdentifiableObjects to include in the list.
-     * @return a list of IdentifiableObjects.
-     */
-    public static List<IdentifiableObject> getList( IdentifiableObject... objects )
-    {
-        List<IdentifiableObject> list = new ArrayList<>();
-
-        if ( objects != null )
-        {
-            Collections.addAll( list, objects );
-        }
-
-        return list;
-    }
-
-    /**
-     * Returns a list with erasure IdentifiableObject based on the given collection.
-     *
-     * @param collection the collection.
-     * @return a list of IdentifiableObjects.
-     */
-    public static List<IdentifiableObject> asList( Collection<? extends IdentifiableObject> collection )
-    {
-        List<IdentifiableObject> list = new ArrayList<>();
-        list.addAll( collection );
-        return list;
-    }
-
-    /**
-     * Returns a list typed with the desired erasure based on the given collection.
-     * This operation implies an unchecked cast and it is the responsibility of
-     * the caller to make sure the cast is valid.
-     *
-     * @param collection the collection.
-     * @return a list.
-     */
-    @SuppressWarnings( "unchecked" )
-    public static <T extends IdentifiableObject> List<T> asTypedList( Collection<IdentifiableObject> collection )
-    {
-        List<T> list = new ArrayList<>();
-
-        if ( collection != null )
-        {
-            for ( IdentifiableObject object : collection )
-            {
-                list.add( (T) object );
-            }
-        }
-
-        return list;
-    }
-
-    /**
      * Removes duplicates from the given list while maintaining the order.
      *
      * @param list the list.