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