KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > tc > async > impl > DefaultAddPredicate


1 /*
2  * All content copyright (c) 2003-2006 Terracotta, Inc., except as may otherwise be noted in a separate copyright notice. All rights reserved.
3  */

4 package com.tc.async.impl;
5
6 import com.tc.async.api.AddPredicate;
7 import com.tc.async.api.EventContext;
8
9 /**
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 }
Popular Tags