Android String Parse isDifferent(String str1, String str2)

Here you can find the source of isDifferent(String str1, String str2)

Description

is Different

Declaration

public static boolean isDifferent(String str1, String str2) 

Method Source Code

//package com.java2s;
import java.util.ArrayList;

public class Main {
    public static boolean isDifferent(String str1, String str2) {
        return !equals(str1, str2);
    }// w  w w .  java 2s  . co  m

    public static boolean equals(String str1, String str2) {
        if (str1 == null && str2 == null) {
            return true;
        } else if (str1 != null && str2 != null) {
            return str1.equals(str2);
        } else {
            return false;
        }
    }

    public static boolean equals(ArrayList<String> strings1,
            ArrayList<String> strings2) {
        int len1 = strings1 == null ? 0 : strings1.size();
        int len2 = strings2 == null ? 0 : strings2.size();
        if (len1 != len2) {
            return false;
        }
        if (len1 == 0 && len2 == 0) {
            return true;
        }
        for (int i = 0; i < strings1.size(); i++) {
            String string1 = strings1.get(i);
            String string2 = strings2.get(i);
            if (isDifferent(string1, string2)) {
                return false;
            }
        }
        return true;
    }
}

Related

  1. isASCII(String str)
  2. isAllDigital(String str)
  3. isDecimal(String str)
  4. isDigits(Object o)
  5. isDigits(String s)
  6. isDouble(String str)
  7. isIDCard(String str)