public class CallLogEntry extends Object implements Comparable<CallLogEntry>
CallLogEntry
is an aggregation
of a Date
and a PhoneNumber
.Constructor and Description |
---|
CallLogEntry(Date date,
PhoneNumber number)
Initialize this call log entry to the given date and phone number.
|
Modifier and Type | Method and Description |
---|---|
int |
compareTo(CallLogEntry other)
Compares two call log entries for order.
|
boolean |
equals(Object obj)
Compares two entries for equality.
|
Date |
getDate()
Returns the date of this entry.
|
PhoneNumber |
getNumber()
Returns the phone number of this entry.
|
int |
hashCode()
Returns a hash code for this entry.
|
String |
toString()
Returns a string representation for this entry.
|
public CallLogEntry(Date date, PhoneNumber number)
date
- the date of this entrynumber
- the phone number of this entrypublic Date getDate()
public PhoneNumber getNumber()
public int hashCode()
public boolean equals(Object obj)
CallLogEntry
object that has the
same date and phone number as this entry.public int compareTo(CallLogEntry other)
compareTo
in interface Comparable<CallLogEntry>
other
- the call log entry to compare against