TimurMahammadov / google-collections

Automatically exported from code.google.com/p/google-collections
Apache License 2.0
0 stars 0 forks source link

Usage of Functions.compose function #21

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?

        HashMap<Object,String> hashMap=new HashMap<Object,String>
();
        hashMap.put("name","prashant");

        HashMap<Object,Object> hashMap1=new HashMap<Object,Object>
();
        hashMap.put("name","prashant");

        Function<Object,Object> hashFuc=Functions.forMap(hashMap1);
        Object o=hashFuc.apply("name");
        System.out.println(o.getClass().getSimpleName());

        Function<Object,String> hashFuc1=Functions.forMap(hashMap);

        Function<Object,String> composeFunc=Functions.compose
(hashFuc,hashFuc1);

What is the expected output? What do you see instead?
Want no compilation problems.

What version of the product are you using? On what operating system?
version which is in beta release.

Please provide any additional information below.
This surely is not an issue with google collections but thought of asking 
for help.As also logged a message in developer mailing list for reference.

Original issue reported on code.google.com by jvrspras...@gmail.com on 26 Oct 2007 at 4:15

GoogleCodeExporter commented 9 years ago
User has arguments in the wrong order.

It's possible to make an argument that the compose() arguments should be in the 
other
order, but this is probably not worth the pain of changing.

Original comment by kevin...@gmail.com on 30 Oct 2007 at 11:08