A few to start with:
mFriendsList
? Should it bemTotalNames
.This can be initialized to just
new ArrayList<>(mTotalNames.size());
since you are already taking care of this in your function.private final List<String> mAvailableNames = new ArrayList<String>(mTotalNames);
Your helper functions ends up with the following results which seems erroneous
Name List: {"Nightly Nexus", "You Next", "thepace"};
Query String: y nex Your result: You Next.
Expected: The whole name should start with the given string irrespective of the space or the whole name should contain the string irrespective of the name.`
Naming: Please add some value either in name or comments, former preferred, so that it imparts individuality to the funciton. Correct this:
helper0, helper1.
Use
StringUtils.isBlank()
instead of this to check null, empty and blank query string:if (s.length() <= 0)
Collective overuse of collections:
new LinkedList<String>(Arrays.asList(name.split("\\s+")));
A few to start with:
mFriendsList
? Should it bemTotalNames
.This can be initialized to just
new ArrayList<>(mTotalNames.size());
since you are already taking care of this in your function.private final List<String> mAvailableNames = new ArrayList<String>(mTotalNames);
Your helper functions ends up with the following results which seems erroneous
Name List: {"Nightly Nexus", "You Next", "thepace"};
Query String: y nex Your result: You Next.
Expected: The whole name should start with the given string irrespective of the space or the whole name should contain the string irrespective of the name.`
Naming: Please add some value either in name or comments, former preferred, so that it imparts individuality to the funciton. Correct this:
helper0, helper1.
Use
StringUtils.isBlank()
instead of this to check null, empty and blank query string:if (s.length() <= 0)
Collective overuse of collections:
new LinkedList<String>(Arrays.asList(name.split("\\s+")));
A few to start with:
mFriendsList
? Should it bemTotalNames
.This can be initialized to just
new ArrayList<>(mTotalNames.size());
since you are already taking care of this in your function.private final List<String> mAvailableNames = new ArrayList<String>(mTotalNames);
Your helper functions ends up with the following results which seems erroneous
Name List: {"Nightly Nexus", "You Next", "thepace"};
Query String: y nex Your result: You Next.
Expected: The whole name should start with the given string irrespective of the space or the whole name should contain the string irrespective of the name.`
Naming: Please add some value either in name or comments, former preferred, so that it imparts individuality to the funciton. Correct this:
helper0, helper1.
Use
StringUtils.isBlank()
instead of this to check null, empty and blank query string:if (s.length() <= 0)
Collective overuse of collections:
new LinkedList<String>(Arrays.asList(name.split("\\s+")));
A few to start with:
mFriendsList
? Should it bemTotalNames
.This can be initialized to just
new ArrayList<>(mTotalNames.size());
since you are already taking care of this in your function.private final List<String> mAvailableNames = new ArrayList<String>(mTotalNames);
Your helper functions ends up with the following results which seems erroneous
Name List: {"Nightly Nexus", "You Next", "thepace"}; Query String: y nex Your result: You Next. Expected: The whole name should start with the given string irrespective of the space or the whole name should contain the string irrespective of the name.
Name List: {"Nightly Nexus", "You Next", "thepace"};
Query String: y nex Your result: You Next.
Expected: The whole name should start with the given string irrespective of the space or the whole name should contain the string irrespective of the name.`
Naming: Please add some value either in name or comments, former preferred, so that it imparts individuality to the funciton. Correct this:
helper0, helper1.
Use
StringUtils.isBlank()
instead of this to check null, empty and blank query string:if (s.length() <= 0)
Collective overuse of collections:
new LinkedList<String>(Arrays.asList(name.split("\\s+")));
Link: http://stackoverflow.com/questions/157944/create-arraylist-arraylistt-from-array-tLink
A few to start with:
mFriendsList
? Should it bemTotalNames
.This can be initialized to just
new ArrayList<>(mTotalNames.size());
since you are already taking care of this in your function.private final List<String> mAvailableNames = new ArrayList<String>(mTotalNames);
Your helper functions ends up with the following results which seems erroneous
Name List: {"Nightly Nexus", "You Next", "thepace"}; Query String: y nex Your result: You Next. Expected: The whole name should start with the given string irrespective of the space or the whole name should contain the string irrespective of the name.
Naming: Please add some value either in name or comments, former preferred, so that it imparts individuality to the funciton. Correct this:
helper0, helper1.
Use
StringUtils.isBlank()
instead of this to check null, empty and blank query string:if (s.length() <= 0)
Collective overuse of collections:
new LinkedList<String>(Arrays.asList(name.split("\\s+")));
Link: http://stackoverflow.com/questions/157944/create-arraylist-arraylistt-from-array-t
A few to start with:
mFriendsList
? Should it bemTotalNames
.This can be initialized to just
new ArrayList<>(mTotalNames.size());
since you are already taking care of this in your function.private final List<String> mAvailableNames = new ArrayList<String>(mTotalNames);
Your helper functions ends up with the following results which seems erroneous
Name List: {"Nightly Nexus", "You Next", "thepace"};
Query String: y nex Your result: You Next.
Expected: The whole name should start with the given string irrespective of the space or the whole name should contain the string irrespective of the name.`
Naming: Please add some value either in name or comments, former preferred, so that it imparts individuality to the funciton. Correct this:
helper0, helper1.
Use
StringUtils.isBlank()
instead of this to check null, empty and blank query string:if (s.length() <= 0)
Collective overuse of collections:
new LinkedList<String>(Arrays.asList(name.split("\\s+")));
A few to start with:
mFriendsList
? Should it bemTotalNames
.This can be initialized to just
new ArrayList<>(mTotalNames.size());
since you are already taking care of this in your function.private final List<String> mAvailableNames = new ArrayList<String>(mTotalNames);
Your helper functions ends up with the following results which seems erroneous
Name List: {"Nightly Nexus", "You Next", "thepace"}; Query String: y nex Your result: You Next. Expected: The whole name should start with the given string irrespective of the space or the whole name should contain the string irrespective of the name.
Naming: Please add some value either in name or comments, former preferred, so that it imparts individuality to the funciton. Correct this:
helper0, helper1.
Use
StringUtils.isBlank()
instead of this to check null, empty and blank query string:if (s.length() <= 0)
Collective overuse of collections:
new LinkedList<String>(Arrays.asList(name.split("\\s+")));
A string array would have sufficed the objective.
Link: http://stackoverflow.com/questions/157944/create-arraylist-arraylistt-from-array-t
A few to start with:
mFriendsList
? Should it bemTotalNames
.This can be initialized to just
new ArrayList<>(mTotalNames.size());
since you are already taking care of this in your function.private final List<String> mAvailableNames = new ArrayList<String>(mTotalNames);
Your helper functions ends up with the following results which seems erroneous
Name List: {"Nightly Nexus", "You Next", "thepace"}; Query String: y nex Your result: You Next. Expected: The whole name should start with the given string irrespective of the space or the whole name should contain the string irrespective of the name.
Naming: Please add some value either in name or comments, former preferred, so that it imparts individuality to the funciton. Correct this:
helper0, helper1.
Use
StringUtils.isBlank()
instead of this to check null, empty and blank query string:if (s.length() <= 0)
Collective overuse of collections:
new LinkedList<String>(Arrays.asList(name.split("\\s+")));
A string array would have sufficed the objective.
A few to start with:
mFriendsList
? Should it bemTotalNames
.This can be initialized to just
new ArrayList<>(mTotalNames.size());
since you are already taking care of this in your function.private final List<String> mAvailableNames = new ArrayList<String>(mTotalNames);
Your helper functions ends up with the following results which seems erroneous
Name List: {"Nightly Nexus", "You Next", "thepace"}; Query String: y nex Your result: You Next. Expected: The whole name should start with the given string irrespective of the space or the whole name should contain the string irrespective of the name.
Naming: Please add some value either in name or comments, former preferred, so that it imparts individuality to the funciton. Correct this:
helper0, helper1.
Use
StringUtils.isBlank()
instead of this to check null, empty and blank query string:if (s.length() <= 0)
Collective overuse of collections:
new LinkedList<String>(Arrays.asList(name.split("\\s+")));
Link: http://stackoverflow.com/questions/157944/create-arraylist-arraylistt-from-array-t