public class ItemKey
extends java.lang.Object
implements java.lang.Comparable, java.io.Serializable
Field Used For: Appt Meeting Task Event
=====================================================
date yes yes yes yes
time yes yes yes no
duration yes yes no no
title yes yes yes yes
priority no no yes no
ItemKey is suitable for use in either a HashMap or a TreeMap, since it
specializes Object.hashCode (for the HashMap) and implements Comparable (for
the TreeMap).| Modifier and Type | Field and Description |
|---|---|
protected Date |
date
The date field used in all keys
|
protected Duration |
duration
The duration field used in appointment and meeting keys
|
protected Time |
time
The time field used in all keys except for events
|
protected java.lang.String |
title
The title field used in all keys
|
| Constructor and Description |
|---|
ItemKey(Date date,
Time time,
Duration duration,
java.lang.String title,
int priority)
Construct this with the given field values.
|
| Modifier and Type | Method and Description |
|---|---|
protected int |
compareAppointmentKeys(ItemKey apptKey)
Compare this and the given appointment/meeting key.
|
protected int |
compareTaskKeys(ItemKey taskKey)
Compare this and the given task key.
|
int |
compareTo(java.lang.Object o)
Define compareTo based on the total ordering of items defined in the
spec.
|
boolean |
equals(java.lang.Object obj)
Define equality for this as componentwise equality.
|
int |
hashCode()
Define this' hash code as the sum of component hash codes.
|
protected boolean |
isEventKey()
Return true if this is an event key.
|
protected boolean |
isTaskKey()
Return true if this is a task key.
|
java.lang.String |
toString()
Convert this to a string representation.
|
protected Date date
protected Time time
protected Duration duration
protected java.lang.String title
public boolean equals(java.lang.Object obj)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Objectpublic int compareTo(java.lang.Object o)
compareTo in interface java.lang.Comparablepublic java.lang.String toString()
toString in class java.lang.Objectprotected int compareAppointmentKeys(ItemKey apptKey)
protected int compareTaskKeys(ItemKey taskKey)
protected boolean isEventKey()
protected boolean isTaskKey()