problem when use this coding please found slove

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

problem when use this coding please found slove

hager sallah
I use linkedlist to pass value in filter function in this coding not resulting from code but when pass value direct to filter function th result is  (2,Customer#000000002,XSTf4&&NCwDVaWNe6tEgvwfmRchLXak,121.65,AUTOMOBILE)problem in this line i pass value from linkedlist
 c.getField(4).equals(values.get(0).toString()) && c.getField(2).equals(values.get(1).toString()) new FilterFunction<Customer>() {
 @Override
 public boolean filter(Customer c) { return c.getField(4).equals(values.get(0).toString()) && c.getField(2).equals(values.get(1).toString()) ; } }); but when write the coding when pass value Direct result coding = (2,Customer#000000002,XSTf4&&NCwDVaWNe6tEgvwfmRchLXak,121.65,AUTOMOBILE)
when pass value Direct
 new FilterFunction<Customer>() {
 @Override
 public boolean filter(Customer c) { return c.getField(4).equals("AUTOMOBILE") && c.getField(2).equals("XSTf4&&NCwDVaWNe6tEgvwfmRchLXak") ; } });   
Reply | Threaded
Open this post in threaded view
|

Re: problem when use this coding please found slove

Aljoscha Krettek-2
Hi,
what is the difference in the results, you posted this:
(2,Customer#000000002,XSTf4&&NCwDVaWNe6tEgvwfmRchLXak,121.65,AUTOMOBILE)

and this:
(2,Customer#000000002,XSTf4&&NCwDVaWNe6tEgvwfmRchLXak,121.65,AUTOMOBILE)

Also, how to you fill the LinkedList and how do you pass it to the
user function?

Cheers,
Aljoscha

On Sun, Apr 19, 2015 at 3:17 PM, hager sallah
<[hidden email]> wrote:
> I use linkedlist to pass value in filter function in this coding not resulting from code but when pass value direct to filter function th result is  (2,Customer#000000002,XSTf4&&NCwDVaWNe6tEgvwfmRchLXak,121.65,AUTOMOBILE)problem in this line i pass value from linkedlist
>  c.getField(4).equals(values.get(0).toString()) && c.getField(2).equals(values.get(1).toString()) new FilterFunction<Customer>() {
>  @Override
>  public boolean filter(Customer c) { return c.getField(4).equals(values.get(0).toString()) && c.getField(2).equals(values.get(1).toString()) ; } }); but when write the coding when pass value Direct result coding = (2,Customer#000000002,XSTf4&&NCwDVaWNe6tEgvwfmRchLXak,121.65,AUTOMOBILE)
> when pass value Direct
>  new FilterFunction<Customer>() {
>  @Override
>  public boolean filter(Customer c) { return c.getField(4).equals("AUTOMOBILE") && c.getField(2).equals("XSTf4&&NCwDVaWNe6tEgvwfmRchLXak") ; } });