@ -14,78 +14,78 @@
* The < tt > GuiCallRecord < / tt > is meant to be used in the call history to
* represent a history call record . It wraps a < tt > Call < / tt > or a
* < tt > CallRecord < / tt > object .
*
*
* @author Yana Stamcheva
* /
public class GuiCallRecord
{
private Vector < GuiCallPeerRecord > p articipants;
private Vector < GuiCallPeerRecord > p eers;
private Date startTime ;
private Date endTime ;
/ * *
* Creates an instance of < tt > GuiCallRecord < tt > .
* @param guiP articipantRecords participant records contained in this call
* @param guiP eerRecords peer records contained in this call
* record
* @param startTime call start time
* @param endTime call end time
* /
public GuiCallRecord ( Vector < GuiCallPeerRecord > guiP articipant Records,
public GuiCallRecord ( Vector < GuiCallPeerRecord > guiP eer Records,
Date startTime ,
Date endTime )
{
{
this . startTime = startTime ;
this . endTime = endTime ;
p articipants = guiParticipant Records;
p eers = guiPeer Records;
}
/ * *
* Creates a < tt > GuiCallRecord < / tt > from a < tt > CallRecord < / tt > . The
* < tt > GuiCallRecord < / tt > will be used in the call history .
*
* @param callRecord the < tt > CallP articipant Record< / tt >
*
* @param callRecord the < tt > CallP eer Record< / tt >
* /
public GuiCallRecord ( CallRecord callRecord )
{
{
this . startTime = callRecord . getStartTime ( ) ;
this . endTime = callRecord . getEndTime ( ) ;
this . p articipant s = new Vector < GuiCallPeerRecord > ( ) ;
this . p eer s = new Vector < GuiCallPeerRecord > ( ) ;
Iterator < CallPeerRecord > records = callRecord . getPeerRecords ( ) . iterator ( ) ;
while ( records . hasNext ( ) ) {
CallPeerRecord record
= records . next ( ) ;
GuiCallPeerRecord newRecord
= new GuiCallPeerRecord (
record , callRecord . getDirection ( ) ) ;
this . p articipant s. add ( newRecord ) ;
this . p eer s. add ( newRecord ) ;
}
}
public Date getEndTime ( )
{
return endTime ;
}
public Iterator < GuiCallPeerRecord > getP articipant s( )
public Iterator < GuiCallPeerRecord > getP eer s( )
{
return p articipant s. iterator ( ) ;
return p eer s. iterator ( ) ;
}
public int getP articipant sCount( )
public int getP eer sCount( )
{
return p articipant s. size ( ) ;
return p eer s. size ( ) ;
}
public Date getStartTime ( )
{
return startTime ;