|
ContactCenters V. 0.9.9. |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectumontreal.iro.lecuyer.contactcenters.msk.model.CallCenterUtil
public class CallCenterUtil
Provides helper static methoeds used for the initialization of call center models.
Method Summary | ||
---|---|---|
static String |
getAgentGroupInfo(CallCenterParams ccParams,
int i)
Similar to getCallTypeInfo(CallCenterParams,int) ,
for agent group i. |
|
static String |
getCallTypeInfo(CallCenterParams ccParams,
int k)
Returns information about a call type k defined in call center parameters ccParams. |
|
static GregorianCalendar |
getDate(XMLGregorianCalendar xgcal)
Converts the given XML gregorian calendar into a Java gregorian calendar, with time reset to midnight relative to the timezone given in the XML gregorian calendar. |
|
static double[] |
getDoubleArray(double[] array,
int numPeriods)
Similar to getIntArray(int[],int) ,
for an array of double-precision values. |
|
static int[] |
getIntArray(int[] array,
int numPeriods)
Constructs and returns an array containing numPeriods elements from the input array array. |
|
static long |
getTimeInMillis(XMLGregorianCalendar xgcal)
Returns the time duration, in milliseconds, elapsed between midnight and the time given by xgcal, at the date set by xgcal. |
|
static
|
toStringValues(Map<? extends K,? extends Object> map)
Constructs and returns a map for which each entry (k, v') is created from entry (k, v) in map map, where k is a key, and v' is the string representation of the value v. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static int[] getIntArray(int[] array, int numPeriods)
array
- the input array.numPeriods
- the number of elements in the output array.
IllegalArgumentException
- if the
given array is too short.public static double[] getDoubleArray(double[] array, int numPeriods)
getIntArray(int[],int)
,
for an array of double-precision values.
array
- the input array.numPeriods
- the number of elements in the output array.
IllegalArgumentException
- if the
given array is too short.public static GregorianCalendar getDate(XMLGregorianCalendar xgcal)
This method first creates a
Java GregorianCalendar
by using
XMLGregorianCalendar.toGregorianCalendar()
(this uses the default
timezone offset if no offset was specified explicitly), or the no-argument
constructor of GregorianCalendar
if xgcal is
null (this creates a calendar
initialized to the current date and time).
It then resets the time fields of the created calendar
to midnight
before returning it.
xgcal
- the XML gregorian calendar to be converted to a date.
public static long getTimeInMillis(XMLGregorianCalendar xgcal)
XMLGregorianCalendar.toGregorianCalendar(TimeZone,Locale,XMLGregorianCalendar)
with a default timezone corresponding to GMT, the default locale, and no
default XML gregorian calendar. It then clears all fields of the resulting
calendar corresponding to date components, and returns
Calendar.getTimeInMillis()
. If xgcal is null,
this returns 0.
xgcal
- the XML gregorian calendar.
public static String getCallTypeInfo(CallCenterParams ccParams, int k)
ccParams
- the call center parameters.k
- the index of the call type.
public static String getAgentGroupInfo(CallCenterParams ccParams, int i)
getCallTypeInfo(CallCenterParams,int)
,
for agent group i.
This method returns a string of the form
agent group i (name) included
in some error messages.
ccParams
- the call center parameters.i
- the index of the agent group.
public static <K> Map<K,String> toStringValues(Map<? extends K,? extends Object> map)
K
- the type of keys in the maps.map
- the source map.
|
ContactCenters V. 0.9.9. |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |