Add samplePlayer(Collection<ServerPing.SamplePlayer>)
method for ServerPing.Builder
#1465
Labels
type: feature
New feature or request
Requested Feature
ServerPing.Builder
should receive asamplePlayer(Collection<ServerPing.SamplePlayer>)
method, so that you could use Lists, Sets, etc directly instead of an array (or having to convert a list to an array).Why is this needed?
It seems weird to have a method accept an array, only to convert it into a list internally, while not having a method allowing to provide a list directly.
With the current method available, you would do either something like this:
...or alternatively this:
The first aproach seems like extra steps for something as simple as this while the second seems like a waste, as why would you make a list, only to need to convert to an array, to then have it be a list again in the end?
The new method would remove the need of either making and populating an array, or calling the
toArray
on a List only for it to be made a list again internally.Alternative Solutions
Current solution (And easiest) is to use the
toArray
List aproach, giving the wasted feeling.Additional Information
No response
The text was updated successfully, but these errors were encountered: