Class AsciiSet
java.lang.Object
org.apache.juneau.common.internal.AsciiSet
Stores a set of ASCII characters for quick lookup.
-
Nested Class Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
contains
(char c) Returnstrue if the specified character is in this store.boolean
contains
(int c) Returnstrue if the specified character is in this store.boolean
Returnstrue if the specified string contains at least one character in this set.boolean
Returnstrue if the specified string contains only characters in this set.copy()
Copies an existingAsciiSet
so that you can augment it with additional values.static AsciiSet.Builder
create()
Creates a builder for an ASCII set.static AsciiSet
Creates an ASCII set with the specified characters.
-
Method Details
-
create
Creates an ASCII set with the specified characters.- Parameters:
chars
- The characters to keep in this store.- Returns:
- A new object.
-
create
Creates a builder for an ASCII set.- Returns:
- A new builder.
-
copy
Copies an existingAsciiSet
so that you can augment it with additional values.- Returns:
- A builder initialized to the same characters in the copied set.
-
contains
Returnstrue if the specified character is in this store.- Parameters:
c
- The character to check.- Returns:
true if the specified character is in this store.
-
contains
Returnstrue if the specified character is in this store.- Parameters:
c
- The character to check.- Returns:
true if the specified character is in this store.
-
contains
Returnstrue if the specified string contains at least one character in this set.- Parameters:
s
- The string to test.- Returns:
true if the string is not null and contains at least one character in this set.
-
containsOnly
Returnstrue if the specified string contains only characters in this set.- Parameters:
s
- The string to test.- Returns:
true if the string contains only characters in this set.
Nulls always returnfalse .
Blanks always returntrue .
-