Package dsa.lab01.exercises
Class StringArray
java.lang.Object
dsa.lab01.exercises.StringArray
- All Implemented Interfaces:
- StringContainer
An array-based string container.
 
Contains some number of strings using an array.
- 
Constructor SummaryConstructorsConstructorDescriptionConstruct an empty string array.StringArray(String... strings) Construct a string array containing the given strings.
- 
Method SummaryMethods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface dsa.lab01.base.StringContainerisEmpty
- 
Constructor Details- 
StringArraypublic StringArray()Construct an empty string array.
- 
StringArrayConstruct a string array containing the given strings.- Parameters:
- strings- the strings
 
 
- 
- 
Method Details- 
sizepublic int size()Description copied from interface:StringContainerGet the number of contained strings.- Specified by:
- sizein interface- StringContainer
- Returns:
- the size
 
- 
containsDescription copied from interface:StringContainerCheck if the given string is equal to any of those contained.- Specified by:
- containsin interface- StringContainer
- Parameters:
- string- the string to check for membership
- Returns:
- whether such a string is contained
 
 
-