Reviewed code.

This commit is contained in:
Christian P. MOMON 2020-10-05 15:22:46 +02:00
parent 4aca746ee0
commit 61d913c3e8

View file

@ -22,9 +22,8 @@ import java.util.Collection;
import java.util.HashSet; import java.util.HashSet;
/** /**
* This class is a set of String objects with specific methods. It makes * This class is a set of String objects with specific methods. It makes possible to build a string without any copy.
* possible to build a string without any copy. The goal is to make easier the * The goal is to make easier the use of set of strings.
* use of set of strings.
*/ */
public class StringSet extends HashSet<String> public class StringSet extends HashSet<String>
{ {
@ -39,8 +38,8 @@ public class StringSet extends HashSet<String>
} }
/** /**
* Constructs a list of string of the specified collection, in the order they * Constructs a list of string of the specified collection, in the order they are returned by the collection's
* are returned by the collection's iterator. * iterator.
* *
* @param source * @param source
* the source * the source
@ -82,7 +81,6 @@ public class StringSet extends HashSet<String>
if (source != null) if (source != null)
{ {
//
for (String string : source) for (String string : source)
{ {
this.add(string); this.add(string);
@ -102,7 +100,6 @@ public class StringSet extends HashSet<String>
if (source != null) if (source != null)
{ {
//
for (String string : source) for (String string : source)
{ {
this.add(string); this.add(string);
@ -122,15 +119,13 @@ public class StringSet extends HashSet<String>
{ {
boolean result; boolean result;
if (string != null) if (string == null)
{ {
// result = false;
result = super.add(string);
} }
else else
{ {
// result = super.add(string);
result = false;
} }
// //