Java Number Min Value min(String s)

Here you can find the source of min(String s)

Description

String demotion - returns either the given string or null (if given string length is zero).

License

Open Source License

Declaration

public static String min(String s) 

Method Source Code

//package com.java2s;

public class Main {
    /**/*from  w  w  w  . ja v  a  2  s . c o  m*/
     * String demotion - returns either the given string or null (if given string length is zero).
     */
    public static String min(String s) {
        return s != null && s.length() == 0 ? null : s;
    }

    /**
     * Returns the length of given string (supports null).
     */
    public static int length(CharSequence aString) {
        return aString == null ? 0 : aString.length();
    }
}

Related

  1. min(Object o1, Object o2)
  2. min(String a, String b)
  3. min(String a, String b)
  4. min(String in, int len)
  5. min(String name)
  6. min(T a, T b)
  7. min(T a, T b)
  8. min(T c1, T c2)
  9. min(T v1, T v2)