Ignore:
Timestamp:
2015-05-07T01:27:41+02:00 (11 years ago)
Author:
Don-vip
Message:

fix squid:S1319 - Declarations should use Java collection interfaces rather than specific implementation classes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/tools/Pair.java

    r7509 r8338  
    22package org.openstreetmap.josm.tools;
    33import java.util.ArrayList;
     4import java.util.List;
    45
    56/**
     
    3132    }
    3233
    33     @Override public int hashCode() {
     34    @Override
     35    public int hashCode() {
    3436        return a.hashCode() + b.hashCode();
    3537    }
    3638
    37     @Override public boolean equals(Object other) {
     39    @Override
     40    public boolean equals(Object other) {
    3841        if (other instanceof Pair<?, ?>) {
    3942            Pair<?, ?> o = (Pair<?, ?>)other;
     
    4346    }
    4447
    45     public static <T> ArrayList<T> toArrayList(Pair<T, T> p) {
    46         ArrayList<T> l = new ArrayList<>(2);
     48    public static <T> List<T> toList(Pair<T, T> p) {
     49        List<T> l = new ArrayList<>(2);
    4750        l.add(p.a);
    4851        l.add(p.b);
Note: See TracChangeset for help on using the changeset viewer.