jamesbrowder / guava-libraries

Automatically exported from code.google.com/p/guava-libraries
Apache License 2.0
0 stars 0 forks source link

Consider adding a simple state machine logic #748

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Sth. like https://gist.github.com/1275110 could be a useful addition in Guava. 
A few things that should be improved:

* Separate construction / usage with a builder pattern.
* Don't abuse Cache (comptingMap is deprecated in 10.0 - where is the 
alternative?)
* Allow for an associated state model (effectively allowing Predicate instances 
as guards - much more useful). 

Original issue reported on code.google.com by joern.ba...@gmail.com on 10 Oct 2011 at 11:47

GoogleCodeExporter commented 9 years ago
Could also be useful to make the state transitions in Service classes more 
compact.

Original comment by joern.ba...@gmail.com on 10 Oct 2011 at 11:48

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
There are full blown (well, more complete than what you linked) state machine 
frameworks, I know since I've written one. 
https://github.com/thehiflyer/Fettle
It's quite small and only depends on guava. Would that fit your needs?

Original comment by per.mal...@gmail.com on 12 Oct 2011 at 12:25

GoogleCodeExporter commented 9 years ago
We haven't encountered a need for this ourselves.  More justification would be 
helpful.

Original comment by kevinb@google.com on 15 Nov 2011 at 10:24

GoogleCodeExporter commented 9 years ago

Original comment by fry@google.com on 16 Feb 2012 at 7:17

GoogleCodeExporter commented 9 years ago

Original comment by kevinb@google.com on 30 May 2012 at 7:43

GoogleCodeExporter commented 9 years ago

Original comment by kevinb@google.com on 22 Jun 2012 at 6:16

GoogleCodeExporter commented 9 years ago
I'm going to close this until such time as someone is willing to write up a 
properly persuasive proposal, illustrating how this would be used, why it's 
better than the best current alternative users have, and why we think the need 
for it comes up frequently.

Just saying "this could be useful for Guava" tells us nothing.

Original comment by kevinb@google.com on 22 Jun 2012 at 7:00

GoogleCodeExporter commented 9 years ago
This issue has been migrated to GitHub.

It can be found at https://github.com/google/guava/issues/<id>

Original comment by cgdecker@google.com on 1 Nov 2014 at 4:15

GoogleCodeExporter commented 9 years ago

Original comment by cgdecker@google.com on 3 Nov 2014 at 9:09