Is asList Function Part of Lamdaj library

120 Views Asked by At

I'm trying to understand lambdaj library in order to use functional style programming in java. Their wiki page example uses a function called asList which I don't see in any of the lambda packages.

I'm using lambdaj 2.4 version and I'm referring to https://code.google.com/p/lambdaj/wiki/LambdajFeatures

Am I missing anything here ? Is it a function that is assumed to be written by the users of the library?

1

There are 1 best solutions below

2
pfranza On BEST ANSWER

The asList() function is in the java.util.Arrays class. It acts as bridge between array-based and collection-based APIs.

If you don't want to clutter the code with qualifier references (i.e. "Arrays.") you can import the method via a static import import static java.util.Arrays.asList;