Results 1 to 2 of 2
  1. #1
    theChameleon is offline Member
    Join Date
    Oct 2010
    Posts
    26
    Rep Power
    0

    Default need help with scripting in a Java application

    i have many maps of different values

    //maps already filled with values
    SortedMap <String, AnObject> anObjectMap;
    SortedMap <String, AnotherObject> anotherObjectMap;
    ...

    and i want the user to be able to write a script like this:
    Java Code:
    if(anObject.getValue() * 0.01 > anotherObject.getValue()){
    	do1();
    }
    else if(anObject.getValue() * 0.01 < anotherObject.getValue()){
    	do2();
    }
    the object maps (keys are DB compatible dates formatted as yyyy-MM-dd) will iterate through from the front to the back... and the user script would be read with each record and would either run do1(), do2(), or do nothing at all.

    how do i do it?

  2. #2
    DarrylBurke's Avatar
    DarrylBurke is offline Member
    Join Date
    Sep 2008
    Location
    Madgaon, Goa, India
    Posts
    11,193
    Rep Power
    19

    Default Re: need help with scripting in a Java application

    Moved from a staff-only section.

    db
    If you're forever cleaning cobwebs, it's time to get rid of the spiders.

Similar Threads

  1. Groovy Scripting and Java
    By aianta in forum New To Java
    Replies: 2
    Last Post: 08-24-2012, 03:25 PM
  2. JAVA scripting
    By conker5295 in forum New To Java
    Replies: 9
    Last Post: 02-22-2012, 07:49 AM
  3. Java & shell scripting
    By kswapnadevi in forum Advanced Java
    Replies: 12
    Last Post: 11-21-2010, 06:41 AM
  4. P~ 0.9 : Java-friendly scripting with powerful regex
    By p7eregex in forum Java Software
    Replies: 0
    Last Post: 12-17-2007, 08:10 PM
  5. Replies: 0
    Last Post: 05-24-2007, 10:14 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •