org.quartz.utils
Class Key<T>

java.lang.Object
  extended by org.quartz.utils.Key<T>
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<Key>
Direct Known Subclasses:
JobKey, TriggerKey

public class Key<T>
extends java.lang.Object
implements java.io.Serializable, java.lang.Comparable<Key>

Object representing a job or trigger key.

Author:
Jeffrey Wescott
See Also:
Serialized Form

Field Summary
static java.lang.String DEFAULT_GROUP
          The default group for scheduling entities, with the value "DEFAULT".
 
Constructor Summary
Key(java.lang.String name, java.lang.String group)
          Construct a new key with the given name and group.
 
Method Summary
 int compareTo(Key o)
           
static java.lang.String createUniqueName(java.lang.String group)
           
 boolean equals(java.lang.Object obj)
           
 java.lang.String getGroup()
           Get the group portion of the key.
 java.lang.String getName()
           Get the name portion of the key.
 int hashCode()
           
 java.lang.String toString()
           Return the string representation of the key.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

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
Constructor Detail

Key

public Key(java.lang.String name,
           java.lang.String group)
Construct a new key with the given name and group.

Parameters:
name - the name
group - the group
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:
toString in class java.lang.Object
Returns:
the string representation of the key

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

equals

public boolean equals(java.lang.Object obj)
Overrides:
equals in class java.lang.Object

compareTo

public int compareTo(Key o)
Specified by:
compareTo in interface java.lang.Comparable<Key>

createUniqueName

public static java.lang.String createUniqueName(java.lang.String group)


Copyright 2001-2019, Terracotta, Inc.