< prev index next >

src/com/sun/javatest/BasicParameters.java

Print this page
rev 145 : 7902237: Fixing raw use of parameterized class
Reviewed-by: jjg


 783      * @param f1 the first array to be compared
 784      * @param f2 the second array to be compared
 785      * @return true and only if both arguments are null, or if both are not null
 786      * and are element-wise equal.
 787      */
 788     protected static boolean equal(File[] f1, File[] f2) {
 789         if (f1 == null || f2 == null)
 790             return (f1 == f2);
 791 
 792         if (f1.length != f2.length)
 793             return false;
 794 
 795         for (int i = 0; i < f1.length; i++) {
 796             if (f1[i] != f2[i])
 797                 return false;
 798         }
 799 
 800         return true;
 801     }
 802 
 803     private static boolean equal(Vector v, TestFilter[] f) {
 804         if (f == null || v.size() != f.length)
 805             return false;
 806         for (int i = 0; i < v.size(); i++) {
 807             if (!v.elementAt(i).equals(f[i]))
 808                 return false;
 809         }
 810         return true;
 811     }
 812 
 813     //---------------------------------------------------------------------
 814 
 815     private static final I18NResourceBundle i18n =
 816         I18NResourceBundle.getBundleForClass(BasicParameters.class);
 817 }


 783      * @param f1 the first array to be compared
 784      * @param f2 the second array to be compared
 785      * @return true and only if both arguments are null, or if both are not null
 786      * and are element-wise equal.
 787      */
 788     protected static boolean equal(File[] f1, File[] f2) {
 789         if (f1 == null || f2 == null)
 790             return (f1 == f2);
 791 
 792         if (f1.length != f2.length)
 793             return false;
 794 
 795         for (int i = 0; i < f1.length; i++) {
 796             if (f1[i] != f2[i])
 797                 return false;
 798         }
 799 
 800         return true;
 801     }
 802 
 803     private static boolean equal(Vector<TestFilter> v, TestFilter[] f) {
 804         if (f == null || v.size() != f.length)
 805             return false;
 806         for (int i = 0; i < v.size(); i++) {
 807             if (!v.elementAt(i).equals(f[i]))
 808                 return false;
 809         }
 810         return true;
 811     }
 812 
 813     //---------------------------------------------------------------------
 814 
 815     private static final I18NResourceBundle i18n =
 816         I18NResourceBundle.getBundleForClass(BasicParameters.class);
 817 }
< prev index next >