Package dsa.lab01.base
Interface StringContainer
- All Known Implementing Classes:
StringArray
,StringArray
public interface StringContainer
A string container.
Something that contains some number of strings, not necessarily in any particular order.
-
Method Summary
-
Method Details
-
size
int size()Get the number of contained strings.- Returns:
- the size
-
isEmpty
default boolean isEmpty()Check if it's empty.- Returns:
- whether there are no strings
-
contains
Check if the given string is equal to any of those contained.- Parameters:
string
- the string to check for membership- Returns:
- whether such a string is contained
-