Package nl.stokpop.eventscheduler.api
Class EventProperties
- java.lang.Object
-
- nl.stokpop.eventscheduler.api.EventProperties
-
@Immutable public class EventProperties extends java.lang.ObjectThe EventProperties is a list of properties to be used by the Event. One required property is the eventFactory property that should contain the fully qualified class name of the factory class for the event. Another optional property is "enabled", default is true. If set to false, the event will not be active. This is an immutable class and makes an unmodifiable copy of the given Map.
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringPROP_EVENT_ENABLEDstatic java.lang.StringPROP_FACTORY_CLASSNAME
-
Constructor Summary
Constructors Constructor Description EventProperties()EventProperties(java.util.Map<java.lang.String,java.lang.String> props)EventProperties(java.util.Properties properties)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcheckUnknownProperties(java.util.Collection<java.lang.String> allowedProperties, java.util.function.BiConsumer<java.lang.String,java.lang.String> unknownPropertyAction)booleancontainsUnknownProperties(java.util.Collection<java.lang.String> allowedProperties)booleanequals(java.lang.Object obj)java.lang.StringgetFactoryClassName()java.lang.StringgetProperty(java.lang.String name)java.lang.StringgetPropertyOrDefault(java.lang.String name, java.lang.String defaultValue)inthashCode()booleanisEmpty()booleanisEventEnabled()java.lang.StringtoString()
-
-
-
Field Detail
-
PROP_FACTORY_CLASSNAME
public static final java.lang.String PROP_FACTORY_CLASSNAME
- See Also:
- Constant Field Values
-
PROP_EVENT_ENABLED
public static final java.lang.String PROP_EVENT_ENABLED
- See Also:
- Constant Field Values
-
-
Method Detail
-
getProperty
public java.lang.String getProperty(java.lang.String name)
-
getPropertyOrDefault
public java.lang.String getPropertyOrDefault(java.lang.String name, java.lang.String defaultValue)
-
getFactoryClassName
public java.lang.String getFactoryClassName()
-
isEventEnabled
public boolean isEventEnabled()
-
checkUnknownProperties
public void checkUnknownProperties(java.util.Collection<java.lang.String> allowedProperties, java.util.function.BiConsumer<java.lang.String,java.lang.String> unknownPropertyAction)
-
containsUnknownProperties
public boolean containsUnknownProperties(java.util.Collection<java.lang.String> allowedProperties)
-
isEmpty
public boolean isEmpty()
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equalsin classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-