public class CalendarElement
extends java.lang.Object
implements com.appiancorp.core.expr.calendar.PortableCalendarElement
Constructor and Description |
---|
CalendarElement()
Constructs an empty CalendarElement (0 for both values).
|
CalendarElement(int minuteOfDay_,
int lengthInMinutes_)
Constructs a CalendarElement with default values for the start minute
and number of duration minutes.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object o) |
int |
getLengthInMinutes()
Get the duration of this start-end period in minutes.
|
int |
getMinuteOfDay()
Get the minute of the day on which this start-end period will start. 0 minutes
corresponds to midnight.
|
int |
hashCode() |
protected java.lang.String |
minuteString(int minutes) |
void |
setLengthInMinutes(int lengthInMinutes_)
Set the duration of this start-end period in minutes.
|
void |
setMinuteOfDay(int minuteOfDay_)
Set the minute of the day on which this start-end period will start.
|
java.lang.String[] |
startEndToString(javax.servlet.http.HttpSession hs_)
Returns the string respresentation of the Start and End time of this element.
|
static CalendarElement |
stringToCalendarElement(java.lang.String startTime,
java.lang.String endTime,
java.util.Locale locale,
java.lang.String calendarId)
Given the start time and end time as strings, returns a calendar element.
|
java.lang.String |
toString()
Simple toString method.
|
public CalendarElement()
public CalendarElement(int minuteOfDay_, int lengthInMinutes_)
minuteOfDay_
- The starting minute of the day.lengthInMinutes_
- The duration of this element in minutes.public int getLengthInMinutes()
getLengthInMinutes
in interface com.appiancorp.core.expr.calendar.PortableCalendarElement
setLengthInMinutes(int)
public void setLengthInMinutes(int lengthInMinutes_)
lengthInMinutes_
- The duration of the start-end period in minutes
to set.getLengthInMinutes()
public int getMinuteOfDay()
getMinuteOfDay
in interface com.appiancorp.core.expr.calendar.PortableCalendarElement
setMinuteOfDay(int)
public void setMinuteOfDay(int minuteOfDay_)
minuteOfDay_
- The minuteOfDay to set.getMinuteOfDay()
public java.lang.String[] startEndToString(javax.servlet.http.HttpSession hs_)
hs_
- the http session, needed to format the entries according to the locale.public static CalendarElement stringToCalendarElement(java.lang.String startTime, java.lang.String endTime, java.util.Locale locale, java.lang.String calendarId) throws java.text.ParseException
startTime
- The start time as a string.endTime
- The end time as a string.locale
- The locale under which the passed strings where generated.calendarId
- The Id of the calendar under which the passed strings where generated.CalendarElement
java.text.ParseException
- If the startTime and/or endTime cannot be parsed into an actual
time value.public java.lang.String toString()
toString
in class java.lang.Object
protected java.lang.String minuteString(int minutes)
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
Copyright © 2003-2024 Appian Corporation. All Rights Reserved.