All Downloads are FREE. Search and download functionalities are using the official Maven repository.

it.amattioli.workstate.actions.NullGuard Maven / Gradle / Ivy

There is a newer version: 1.0.7
Show newest version
package it.amattioli.workstate.actions;

/**
 * 

* A guard whose {@link #check(AttributeReader, AttributeReader)} method * always returns true *

* *

* Istances of NullGuard are used as null-objects. It is implemented as a singleton * so to get an instance use the {@link #getInstance()} factory method. *

*/ public class NullGuard extends AbstractGuard { public static final Integer NULL_GUARD_PRIORITY = Integer.valueOf(-1000); private static final NullGuard instance = new NullGuard(); public static NullGuard getInstance() { return instance; } private NullGuard() { } public boolean check(AttributeReader event, AttributeReader state) { return true; } public Integer getPriority() { return NULL_GUARD_PRIORITY; } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy