cnrg.itx.ds
Class CustomLocation

java.lang.Object
  |
  +--cnrg.itx.ds.LocationList
        |
        +--cnrg.itx.ds.CustomLocation

public class CustomLocation
extends LocationList

This class represents a list of locations with user-specified time interval.


Field Summary
private static java.lang.String DELIMITER
           
private static java.lang.String HDR_ENDTIME
           
private static java.lang.String HDR_STARTTIME
           
private  java.util.Calendar m_endTime
           
private  java.util.Calendar m_startTime
           
private static int OFFSET_HDR_ENDTIME
           
private static int OFFSET_HDR_STARTTIME
           
 
Fields inherited from class cnrg.itx.ds.LocationList
m_current, m_head, m_tail
 
Constructor Summary
CustomLocation(java.util.Calendar startTime, java.util.Calendar endTime, LocationList lstLocation)
          Constructor
CustomLocation(java.lang.String strRawString)
          Constructor for formatted entry string retrieved from the directory database.
 
Method Summary
 boolean currentValid()
          Check if this custom location object is currently valid for use
 java.util.Calendar getEndTime()
          Get EndTime
 LocationList getLocationList()
          Get Location list
 java.util.Calendar getStartTime()
          Get StartTime
 void setEndTime(java.util.Calendar newEndTime)
          Set EndTime
 void setLocationList(LocationList newLocList)
          Set the Location list to the given new location list
 void setStartTime(java.util.Calendar newStartTime)
          Set StartTime
 java.lang.String toString()
          Convert into formatted entry string to be stored in the directory database
 
Methods inherited from class cnrg.itx.ds.LocationList
add, add, count, first, getAt, next, removeAll, reset
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, wait, wait, wait
 

Field Detail

m_startTime

private java.util.Calendar m_startTime

m_endTime

private java.util.Calendar m_endTime

HDR_STARTTIME

private static final java.lang.String HDR_STARTTIME

HDR_ENDTIME

private static final java.lang.String HDR_ENDTIME

DELIMITER

private static final java.lang.String DELIMITER

OFFSET_HDR_STARTTIME

private static final int OFFSET_HDR_STARTTIME

OFFSET_HDR_ENDTIME

private static final int OFFSET_HDR_ENDTIME
Constructor Detail

CustomLocation

public CustomLocation(java.util.Calendar startTime,
                      java.util.Calendar endTime,
                      LocationList lstLocation)
Constructor
Parameters:
startTime - specifying the starting time
endTime - specifying the ending time
lstLocation - list of location

CustomLocation

public CustomLocation(java.lang.String strRawString)
Constructor for formatted entry string retrieved from the directory database.
Parameters:
strRawString - formatted entry string
Method Detail

currentValid

public boolean currentValid()
Check if this custom location object is currently valid for use
Returns:
True if the custom location is valid for use at the current time

getStartTime

public java.util.Calendar getStartTime()
Get StartTime
Returns:
Calendar object representing a starting time

getEndTime

public java.util.Calendar getEndTime()
Get EndTime
Returns:
Calender object representing an ending time

getLocationList

public LocationList getLocationList()
Get Location list
Returns:
LocationList object

setStartTime

public void setStartTime(java.util.Calendar newStartTime)
Set StartTime
Parameters:
newStartTime - specifying a new starting time

setEndTime

public void setEndTime(java.util.Calendar newEndTime)
Set EndTime
Parameters:
newEndTime - specifying a new end time

setLocationList

public void setLocationList(LocationList newLocList)
Set the Location list to the given new location list
Parameters:
newLocList - the given new location list (if newLocList is null or empty, it does nothing and exits)

toString

public java.lang.String toString()
Convert into formatted entry string to be stored in the directory database
Returns:
String to represents the formatted entry string to be stored in the directory database
Overrides:
toString in class java.lang.Object