Java tutorial
//package com.java2s; public class Main { /** * Checks if a node value is blank (contains only white spaces). * * @param value * The value to check * @return false if the value is null or a non white space character is * found */ public static boolean isBlank(String value) { if (value == null) { return false; } for (int i = 0; i < value.length(); i++) { char c = value.charAt(i); if (!Character.isWhitespace(c)) { return false; } } return true; } }