// Attributes
// ------------------------------------------------------------------------
- private final ITmfLocation<? extends Comparable<?>>[] fLocations;
+ private final ITmfLocation[] fLocations;
// ------------------------------------------------------------------------
// Constructors
*
* @param locations the locations
*/
- public TmfLocationArray(ITmfLocation<? extends Comparable<?>>[] locations) {
+ public TmfLocationArray(ITmfLocation[] locations) {
fLocations = locations;
}
*
* @return the locations
*/
- public ITmfLocation<? extends Comparable<?>>[] getLocations() {
+ public ITmfLocation[] getLocations() {
return fLocations;
}
*/
@Override
public TmfLocationArray clone() {
- ITmfLocation<? extends Comparable<?>>[] clones = new ITmfLocation<?>[fLocations.length];
+ ITmfLocation[] clones = new ITmfLocation[fLocations.length];
for (int i = 0; i < fLocations.length; i++) {
- ITmfLocation<?> location = fLocations[i];
+ ITmfLocation location = fLocations[i];
clones[i] = (location != null) ? location.clone() : null;
}
return new TmfLocationArray(clones);
// ------------------------------------------------------------------------
@Override
- @SuppressWarnings("rawtypes")
+ @SuppressWarnings({ "unchecked", "rawtypes" })
public int compareTo(TmfLocationArray o) {
for (int i = 0; i < fLocations.length; i++) {
- ITmfLocation<? extends Comparable> l1 = (ITmfLocation<? extends Comparable>) fLocations[i].getLocationData();
- ITmfLocation<? extends Comparable> l2 = (ITmfLocation<? extends Comparable>) o.fLocations[i].getLocationData();
- int result = l1.getLocationData().compareTo(l2.getLocationData());
+ Comparable l1 = fLocations[i].getLocationData();
+ Comparable l2 = o.fLocations[i].getLocationData();
+ int result = l1.compareTo(l2);
if (result != 0) {
return result;
}