Permalink
Browse files

Make Pollers factory methods static

  • Loading branch information...
dhemery committed Aug 24, 2012
1 parent 73b5590 commit a3e3482a43d3cb8b5345cc558d4cf427c22f608e
@@ -1,7 +1,5 @@
package com.dhemery.core;
-import com.dhemery.core.Supplier;
-
public class FixedValueSupplier<T> implements Supplier<T> {
private final T value;
@@ -9,7 +9,7 @@
/**
* Create a simple poller that knows how to poll conditions.
*/
- public Poller defaultPoller() {
+ public static Poller defaultPoller() {
return new EvaluatingPoller(new SimplePollEvaluator());
}
@@ -20,7 +20,7 @@ public Poller defaultPoller() {
* @param publisher the publisher through which to publish events
* @return a poller that publishes through {@code publisher}
*/
- public Poller publishedWith(Publisher publisher) {
+ public static Poller publishedWith(Publisher publisher) {
PollEvaluator simpleEvaluator = new SimplePollEvaluator();
PollEvaluator publishingEvaluator = new PublishingPollEvaluator(publisher, simpleEvaluator);
return new EvaluatingPoller(publishingEvaluator);

0 comments on commit a3e3482

Please sign in to comment.