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.


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, wait, wait, wait
 

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