Class DayAndPosition

Object
com.liferay.portal.kernel.cal.DayAndPosition
All Implemented Interfaces:
Serializable, Cloneable

public class DayAndPosition extends Object implements Cloneable, Serializable
Author:
Jonathan Lennox
See Also:
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final int
    Field NO_WEEKDAY
  • Constructor Summary

    Constructors
    Constructor
    Description
    Constructs a DayAndPosition
    DayAndPosition(int day, int position)
    Constructs a DayAndPosition with the day of the week and day position.
  • Method Summary

    Modifier and Type
    Method
    Description
    Returns a clone of this DayAndPosition.
    boolean
    equals(Object object)
    Returns true if the object equals this DayAndPosition.
    int
    Returns the day of the week.
    int
    Returns the day position.
    int
    Returns the hash code of this DayAndPosition.
    static boolean
    Returns true if the day is a valid day of the week.
    static boolean
    Returns true if the day position is valid.
    void
    setDayOfWeek(int d)
    Sets the day of the week
    void
    Sets the day position
    Returns a string representation of the DayAndPosition

    Methods inherited from class java.lang.Object

    finalize, getClass, notify, notifyAll, wait, wait, wait
  • Field Details

  • Constructor Details

    • DayAndPosition

      public DayAndPosition()
      Constructs a DayAndPosition
    • DayAndPosition

      public DayAndPosition(int day, int position)
      Constructs a DayAndPosition with the day of the week and day position.
  • Method Details

    • isValidDayOfWeek

      public static boolean isValidDayOfWeek(int d)
      Returns true if the day is a valid day of the week.
      Parameters:
      d - the day of the week in terms of Calendar or NO_WEEKDAY
      Returns:
      true if the day is a valid day of the week; false otherwise
    • isValidDayPosition

      public static boolean isValidDayPosition(int p)
      Returns true if the day position is valid.
      Parameters:
      p - the day position
      Returns:
      true if the day position is valid; false otherwise
    • clone

      public Object clone()
      Returns a clone of this DayAndPosition.
      Overrides:
      clone in class Object
      Returns:
      a clone of this DayAndPosition
    • equals

      public boolean equals(Object object)
      Returns true if the object equals this DayAndPosition.
      Overrides:
      equals in class Object
      Parameters:
      object - the other object
      Returns:
      true if the object equals this DayAndPosition, false otherwise
    • getDayOfWeek

      public int getDayOfWeek()
      Returns the day of the week.
      Returns:
      the day of the week
    • getDayPosition

      public int getDayPosition()
      Returns the day position.
      Returns:
      the day position
    • hashCode

      public int hashCode()
      Returns the hash code of this DayAndPosition.
      Overrides:
      hashCode in class Object
      Returns:
      the hash code of this DayAndPosition
    • setDayOfWeek

      public void setDayOfWeek(int d)
      Sets the day of the week
      Parameters:
      d - the day of the week
    • setDayPosition

      public void setDayPosition(int p)
      Sets the day position
      Parameters:
      p - the day position
    • toString

      public String toString()
      Returns a string representation of the DayAndPosition
      Overrides:
      toString in class Object
      Returns:
      a string representation of the DayAndPosition