01: /*
02: * All content copyright (c) 2003-2006 Terracotta, Inc., except as may otherwise be noted in a separate copyright notice. All rights reserved.
03: */
04: package com.tc.async.impl;
05:
06: import com.tc.async.api.AddPredicate;
07: import com.tc.async.api.EventContext;
08:
09: /**
10: * @author steve Using the NullObject pattern to put a predicate in when no predicate exists
11: */
12: public class DefaultAddPredicate implements AddPredicate {
13:
14: private final static AddPredicate instance = new DefaultAddPredicate();
15:
16: public static AddPredicate getInstance() {
17: return instance;
18: }
19:
20: /*
21: * (non-Javadoc)
22: *
23: * @see com.tc.async.api.AddPredicate#accept(com.tc.async.api.EventContext)
24: */
25: public boolean accept(EventContext context) {
26: return true;
27: }
28:
29: }
|