Results 1 to 9 of 9
  1. #1
    Join Date
    Oct 2008
    Posts
    68
    Rep Power
    0

    Default [SOLVED] Boolean Expression Evaluation Framework

    We are looking for an expression evaluation framework where we can provide input as boolean conditions like this

    (MyData1 = 'A') AND (MyData2 = 'B' OR MyData2 = 'C' OR MyData2 = 'D')


    I would be getting a String expression and would provide the data to that expression to find what will be the result.

    Any suggestions of pointers would be appreciated.

  2. #2
    kzvi.kzvi.1 is offline Member
    Join Date
    Oct 2008
    Location
    US
    Posts
    58
    Rep Power
    0

    Default

    The
    java-interview-faqs.blogspot.com/2008/09/boolean-expression-evaluation-using-jep.html Boolean Expression Evaluation Example code can be used as a Utility in your application for Boolean expression evaluation.
    Have fun....
    JAVA FAQs

  3. #3
    Eranga's Avatar
    Eranga is offline Moderator
    Join Date
    Jul 2007
    Location
    Colombo, Sri Lanka
    Posts
    11,371
    Blog Entries
    1
    Rep Power
    20

    Default

    Are you looking that how to convert string expressions into different values? I'm not clear what you are asking here.

  4. #4
    Join Date
    Oct 2008
    Posts
    68
    Rep Power
    0

    Default

    I am looking for something which can parse a string boolean expression. for example

    A and (B OR C)

    So when I provide it with values of A,B,C variables then it should give me results as a boolean expression would give. So if
    A=true
    B=true
    C=false
    then result should be true.

    A=false
    b=true
    C=true
    then result should be false

  5. #5
    kzvi.kzvi.1 is offline Member
    Join Date
    Oct 2008
    Location
    US
    Posts
    58
    Rep Power
    0

    Default

    JEP is the right choice but it wil give u results in a decimal values, which u can convert to boolean
    Have fun....
    JAVA FAQs

  6. #6
    Join Date
    Oct 2008
    Posts
    68
    Rep Power
    0

    Default

    is there any framework called JBoolean? I was verbally suggested by a frnd but cant find it on google.

  7. #7
    kzvi.kzvi.1 is offline Member
    Join Date
    Oct 2008
    Location
    US
    Posts
    58
    Rep Power
    0

    Default

    Not sure if there is one like that...you can try this piece of code Boolean Expression Evaluation
    Have fun....
    JAVA FAQs

  8. #8
    Eranga's Avatar
    Eranga is offline Moderator
    Join Date
    Jul 2007
    Location
    Colombo, Sri Lanka
    Posts
    11,371
    Blog Entries
    1
    Rep Power
    20

    Default

    Yes, I've never heard about a framework named JBoolean. Can't deal with decimal values, I mean 0 and 1 maybe useful.

  9. #9
    Join Date
    Mar 2010
    Posts
    1
    Rep Power
    0

Similar Threads

  1. Replies: 6
    Last Post: 10-08-2008, 09:09 AM
  2. boolean to string
    By otoro_java in forum New To Java
    Replies: 2
    Last Post: 01-30-2008, 06:31 AM
  3. boolean variables
    By ravian in forum New To Java
    Replies: 3
    Last Post: 12-31-2007, 05:58 AM
  4. Illegal Start of an Expression
    By David55 in forum CLDC and MIDP
    Replies: 8
    Last Post: 11-02-2007, 10:11 PM
  5. Boolean Expression
    By ritwik07 in forum New To Java
    Replies: 3
    Last Post: 07-11-2007, 05:11 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
  •