MCPcopy Create free account
hub / github.com/crate/crate / hasLength

Method hasLength

server/src/main/java/org/elasticsearch/common/Strings.java:126–128  ·  view source on GitHub ↗

Check that the given CharSequence is neither null nor of length 0. Note: Will return true for a CharSequence that purely consists of whitespace. StringUtils.hasLength(null) = false StringUtils.hasLength("") = false StringUtils.hasLength(" ") = true StringUtils.hasLeng

(@Nullable CharSequence str)

Source from the content-addressed store, hash-verified

124 * @see #hasText(String)
125 */
126 public static boolean hasLength(@Nullable CharSequence str) {
127 return (str != null && str.length() > 0);
128 }
129
130 /**
131 * Trim all occurrences of the supplied leading character from the given String.

Callers 15

TestClusterMethod · 0.95
appendOptMethod · 0.95
appendPropertiesMethod · 0.95
blobsPathMethod · 0.95
addCloseBlocksMethod · 0.95
fromStringMethod · 0.95
isSameOriginMethod · 0.95
setOriginMethod · 0.95
validateMethod · 0.95
createEmptyTranslogMethod · 0.95
TaskIdMethod · 0.95
trimLeadingCharacterMethod · 0.95

Calls 1

lengthMethod · 0.65

Tested by 3

TestClusterMethod · 0.76
appendOptMethod · 0.76
appendPropertiesMethod · 0.76