Results 1 to 5 of 5

Thread: FSM in java

  1. #1
    lawr3nz is offline Member
    Join Date
    Nov 2011
    Posts
    1
    Rep Power
    0

    Default FSM in java

    when implementing FSM do i have to create a new class?
    or how will i implement FSM in java?

  2. #2
    JosAH's Avatar
    JosAH is offline Moderator
    Join Date
    Sep 2008
    Location
    Voorschoten, the Netherlands
    Posts
    13,679
    Blog Entries
    7
    Rep Power
    21

    Default Re: FSM in java

    Creating a new class State (or similar) would be the easiest approach. Given a state and a character (or whatever) should give you a new set of state objects (possibly only one).

    kind regards,

    Jos
    cenosillicaphobia: the fear for an empty beer glass

  3. #3
    Norm's Avatar
    Norm is offline Moderator
    Join Date
    Jun 2008
    Location
    Eastern Florida
    Posts
    17,616
    Rep Power
    25

    Default Re: FSM in java

    The only problem I had building a FSM was the forward references in the state tables.

  4. #4
    JosAH's Avatar
    JosAH is offline Moderator
    Join Date
    Sep 2008
    Location
    Voorschoten, the Netherlands
    Posts
    13,679
    Blog Entries
    7
    Rep Power
    21

    Default Re: FSM in java

    Quote Originally Posted by Norm View Post
    The only problem I had building a FSM was the forward references in the state tables.
    First create the States and later fill in the transition states ...

    kind regards,

    Jos
    cenosillicaphobia: the fear for an empty beer glass

  5. #5
    kjkrum's Avatar
    kjkrum is offline Senior Member
    Join Date
    Apr 2011
    Location
    Tucson, AZ
    Posts
    1,060
    Rep Power
    6

    Default Re: FSM in java

    Are you required to implement your own FSM for school or something? If not, I highly recommend the dk.brics.automaton library.
    Get in the habit of using standard Java naming conventions!

Tags for this Thread

Posting Permissions

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