Package org.sblim.cimclient
Class GenericExts
java.lang.Object
org.sblim.cimclient.GenericExts
public class GenericExts
extends java.lang.Object
Class GenericExts is responsible for generic initialization
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic <T> java.util.Vector<T>
cloneVector
(java.util.Vector<T> oldVec) cloneVector : Generic deep copy of the vector.static <T> java.util.ArrayList<T>
initArrayList
(java.util.ArrayList<T> pAL) initArrayList : If arrayList is null then it will return the new arrayList of same type if it is not null then it will return the same arrayListstatic <T> java.util.ArrayList<T>
initClearArrayList
(java.util.ArrayList<T> pAL) initArrayList : If arrayList is null then it will return the new arrayList of same type if it is not null then it will clear the arrayListMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Constructor Details
-
GenericExts
public GenericExts()
-
-
Method Details
-
initClearArrayList
public static <T> java.util.ArrayList<T> initClearArrayList(java.util.ArrayList<T> pAL) initArrayList : If arrayList is null then it will return the new arrayList of same type if it is not null then it will clear the arrayList- Type Parameters:
T
- : Type Parameter- Parameters:
pAL
- : ArrayList to be initialized- Returns:
- ArrayList : initialized ArrayList
-
initArrayList
public static <T> java.util.ArrayList<T> initArrayList(java.util.ArrayList<T> pAL) initArrayList : If arrayList is null then it will return the new arrayList of same type if it is not null then it will return the same arrayList- Type Parameters:
T
- : Type Parameter- Parameters:
pAL
- : ArrayList to be initialized- Returns:
- ArrayList : initialized ArrayList
-
cloneVector
public static <T> java.util.Vector<T> cloneVector(java.util.Vector<T> oldVec) cloneVector : Generic deep copy of the vector. If original vector is null then return value will also be null.- Type Parameters:
T
- : Type of vector- Parameters:
oldVec
- : The original vector.- Returns:
- Vector
: Deep copy of original vector.
-