Nice TWiki > Doc > UsingNiceFromJava (r1.1 vs. r1.2) TWiki webs:
Dev | Doc | Main | TWiki | Sandbox
Doc . { Changes | Index | Search | Go }
 <<O>>  Difference Topic UsingNiceFromJava (r1.2 - 07 Mar 2003 - DanielBonniot)
Added:
>
>


Added:
>
>


 <<O>>  Difference Topic UsingNiceFromJava (r1.1 - 07 Mar 2003 - AlexGreif)
Added:
>
>

%META:TOPICINFO{author="AlexGreif" date="1047032700" format="1.0" version="1.1"}% %META:TOPICPARENT{name="NiceTutorial"}% This topic gives some tips and hints how to use Nice from Java

java -> nice method

javanice
package test;
import java.util.*;

public class Foo {
 static public List getList() {
  List l = new ArrayList();
  A a = new A("");
  fun.setName(a,"ich");
  l.add(a);
      
  a = new A("");
  fun.setName(a,"du");
  l.add(a);
      
  return l;
 }
}
package test;
import java.util.*;

public void main(String[] args) {
 getList().foreach(A a => println(a.name));
}

List getList() = native List Foo.barList();


class A {
 String name;
 void setName(String n) {name = n;}
}

-- AlexGreif - 07 Mar 2003


Topic UsingNiceFromJava . { View | Diffs | r1.2 | > | r1.1 | More }
Revision r1.1 - 07 Mar 2003 - 10:25 GMT - AlexGreif
Revision r1.2 - 07 Mar 2003 - 13:23 GMT - DanielBonniot
Copyright © 1999-2003 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback.