Package org.quartz.utils
Class Key<T>
- java.lang.Object
-
- org.quartz.utils.Key<T>
-
- All Implemented Interfaces:
java.io.Serializable,java.lang.Comparable<Key<T>>
- Direct Known Subclasses:
JobKey,TriggerKey
public class Key<T> extends java.lang.Object implements java.io.Serializable, java.lang.Comparable<Key<T>>
Object representing a job or trigger key.
- Author:
- Jeffrey Wescott
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringDEFAULT_GROUPThe default group for scheduling entities, with the value "DEFAULT".
-
Constructor Summary
Constructors Constructor Description Key(java.lang.String name, java.lang.String group)Construct a new key with the given name and group.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description intcompareTo(Key<T> o)static java.lang.StringcreateUniqueName(java.lang.String group)booleanequals(java.lang.Object obj)java.lang.StringgetGroup()Get the group portion of the key.java.lang.StringgetName()Get the name portion of the key.inthashCode()java.lang.StringtoString()Return the string representation of the key.
-
-
-
Field Detail
-
DEFAULT_GROUP
public static final java.lang.String DEFAULT_GROUP
The default group for scheduling entities, with the value "DEFAULT".- See Also:
- Constant Field Values
-
-
Method Detail
-
getName
public java.lang.String getName()
Get the name portion of the key.
- Returns:
- the name
-
getGroup
public java.lang.String getGroup()
Get the group portion of the key.
- Returns:
- the group
-
toString
public java.lang.String toString()
Return the string representation of the key. The format will be: <group>.<name>.
- Overrides:
toStringin classjava.lang.Object- Returns:
- the string representation of the key
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equalsin classjava.lang.Object
-
compareTo
public int compareTo(Key<T> o)
- Specified by:
compareToin interfacejava.lang.Comparable<T>
-
createUniqueName
public static java.lang.String createUniqueName(java.lang.String group)
-
-