Primavera Integration API 7.0

com.primavera.integration.util
Class DayOfWeekHelper

java.lang.Object
  extended by com.primavera.integration.util.DayOfWeekHelper

public final class DayOfWeekHelper
extends java.lang.Object

Helper to convert the day of the week value between integer and string types. Sunday is considered the first day of the week, with an index of 1.


Constructor Summary
DayOfWeekHelper()
           
 
Method Summary
static int toInt(java.lang.String dayOfWeek)
          Converts the day of the week from a string to an integer.
static java.lang.String toString(int dayOfWeek)
          Converts the day of the week from an integer to a string.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DayOfWeekHelper

public DayOfWeekHelper()
Method Detail

toInt

public static int toInt(java.lang.String dayOfWeek)
                 throws InvalidValueException
Converts the day of the week from a string to an integer. Sunday has an index of 1.

Parameters:
dayOfWeek - the day of week as a string: "Sunday", "Monday", etc.
Returns:
int the integer value of the day of the week
Throws:
InvalidValueException - when the input value is invalid

toString

public static java.lang.String toString(int dayOfWeek)
                                 throws InvalidValueException
Converts the day of the week from an integer to a string.

Parameters:
dayOfWeek - the day of week as an integer: 1 is Sunday, 2 is Monday, etc.
Returns:
String the string value of the day of the week
Throws:
InvalidValueException - when the input value is out of range

Primavera Integration API 7.0

Copyright © 2003, 2009, Oracle and/or its affiliates. All rights reserved.