Android Open Source - cmus-droid-remote Validator






From Project

Back to project page cmus-droid-remote.

License

The source code is released under:

GNU General Public License

If you think the Android project cmus-droid-remote listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

package net.sourceforge.cmus.droid;
//from   ww w. j  av a2 s. c  om
public final class Validator {
  private Validator() {
  }

  static public boolean validateString(String str) {
    return str != null && str.trim().length() != 0;
  }

  static public boolean validateInteger(String str) {
    if (str != null && str.trim().length() != 0) {
      try {
        Integer.parseInt(str);
        return true;
      } catch (Exception e) {
        return false;
      }
    }
    return false;
  }
}




Java Source Code List

net.sourceforge.cmus.droid.CmusDroidRemoteActivity.java
net.sourceforge.cmus.droid.Validator.java