MCPcopy
hub / github.com/google/guava / isValid

Method isValid

guava/src/com/google/common/net/HostSpecifier.java:132–139  ·  view source on GitHub ↗

Determines whether {@code specifier} represents a valid {@link HostSpecifier} as described in the documentation for {@link #fromValid(String)}.

(String specifier)

Source from the content-addressed store, hash-verified

130 * the documentation for {@link #fromValid(String)}.
131 */
132 public static boolean isValid(String specifier) {
133 try {
134 HostSpecifier unused = fromValid(specifier);
135 return true;
136 } catch (IllegalArgumentException e) {
137 return false;
138 }
139 }
140
141 @Override
142 public boolean equals(@Nullable Object other) {

Callers 2

assertGoodMethod · 0.95
assertBadMethod · 0.95

Calls 1

fromValidMethod · 0.95

Tested by 2

assertGoodMethod · 0.76
assertBadMethod · 0.76