io

lamma

package lamma

Lamma schedule generator is a professional financial schedule generation library.

Some use cases are:


The starting point of the libary is the com.lamma.Lamma class

See also

http://www.lamma.io for samples and tutorials

Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. lamma
  2. AnyRef
  3. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Type Members

  1. sealed trait Anchor extends AnyRef

    relative to which anchor date?

  2. case class CompositeHolidayRule(rules: Set[HolidayRule] = Set.empty) extends HolidayRule with Product with Serializable

    a holiday rule composed of multiple holiday rules.

    a holiday rule composed of multiple holiday rules. this rule will treat a day as holiday if any one of underlying rule returns true

    rules

    list of holiday rules

  3. case class Daily(step: Int = 1) extends Pattern with Product with Serializable

    always recur by calendar day

    always recur by calendar day

    use cases like: "d1 to d2 by n working days" can be solved by: val dates = Date(2014, 5, 10) to Date(2014, 10, 10) except weekends dates.toList.grouped(5).map(_.last).foreach(println)

    step

    in days

  4. case class Date(yyyy: Int, mm: Int, dd: Int) extends Ordered[Date] with WeekOps with MonthOps with YearOps with Product with Serializable

    immutable object to represent a Date.

    immutable object to represent a Date. All mutating operations will return a new Date.

  5. case class DateCol(header: String, dates: List[Date]) extends Product with Serializable

    header

    column header

    dates

    dates of the column, starting from top

  6. case class DateDef(name: String, relativeTo: Anchor = PeriodEnd, shifter: Shifter = NoShift, selector: Selector = SameDay) extends Product with Serializable

  7. case class DateRange(from: Date, to: Date, pattern: Pattern = Daily(1), holiday: HolidayRule = NoHoliday, shifters: List[Shifter] = Nil, selector: Selector = SameDay) extends Traversable[Date] with Product with Serializable

    The DateRange class represents all date values in range.

    The DateRange class represents all date values in range. Both start and end date included.

    This class does not create all Date object to construct a new range. Its complexity is O(1).

    For example:

    Date(2015, 7, 7) to Date(2015, 7, 10) foreach println

    output:

    Date(2015,7,7)
    Date(2015,7,8)
    Date(2015,7,9)
    Date(2015,7,10)
    from

    the start of this range.

    to

    the exclusive end of the range.

    pattern

    pattern used to generate date range

    holiday

    except which holidays

    shifters

    how to shift the date once it's generated? eg, no shift, 2 days later, 2 working days later

    selector

    How to select the date once the date is generated? eg, same day, following working day?

  8. case class DateRangeBuilder(from: Date, to: Date, step: Duration = 1 day, holiday: HolidayRule = NoHoliday, loc: Option[Locator] = None, shifters: List[Shifter] = Nil, selector: Selector = SameDay, customDom: Option[DayOfMonth] = None, customDoy: Option[DayOfYear] = None) extends Traversable[Date] with Product with Serializable

    builder class to manipulate DateRange

    builder class to manipulate DateRange

    from

    from date

    to

    to date

    step
    holiday
    loc
    shifters
    selector

  9. case class DateRow(i: Int, dates: List[Date]) extends Product with Serializable

    i

    row index, starts from 0

    dates

    dates of the row, starting from left

  10. case class DateTable(headers: List[String], dates: List[List[Date]]) extends Product with Serializable

  11. class Dates extends AnyRef

  12. case class DayDuration(n: Int) extends Duration with Product with Serializable

  13. trait DayOfMonth extends AnyRef

    for each PositionOfMonth implementation Lamma expect there is one and only one day match the criteria

  14. sealed trait DayOfMonthSupport extends AnyRef

  15. sealed trait DayOfWeek extends AnyRef

  16. sealed trait DayOfWeekSupport extends AnyRef

  17. trait DayOfYear extends AnyRef

    for each DayOfYear implementation Lamma expect there is one and only one day match the criteria in each year

  18. sealed trait DayOfYearSupport extends AnyRef

  19. class Direction extends Enum[Direction]

  20. sealed trait Duration extends AnyRef

  21. implicit class DurationInt extends AnyRef

  22. trait HolidayRule extends AnyRef

  23. class InvalidPositionOfMonthException extends RuntimeException

  24. class InvalidPositionOfYearException extends RuntimeException

  25. class LammaJavaImports extends AnyRef

  26. sealed trait Locator extends AnyRef

  27. implicit class LocatorImplicit extends AnyRef

  28. class Locators extends AnyRef

  29. sealed trait Month extends AnyRef

  30. case class MonthDuration(n: Int) extends Duration with Product with Serializable

  31. case class Monthly(step: Int, domOpt: Option[DayOfMonth] = None) extends Pattern with Product with Serializable

    step

    number of months for each recurring step

    domOpt

  32. case class OrdinalLocator(o: Either[Int, Last.type]) extends Locator with DayOfWeekSupport with DayOfMonthSupport with DayOfYearSupport with Product with Serializable

    works for Weekly, Monthly and Yearly patterns

  33. case class OrdinalMonthLocator(o: Either[Int, Last.type], dom: DayOfMonthSupport) extends Locator with DayOfYearSupport with Product with Serializable

    works for Yearly pattern only

    works for Yearly pattern only

    o

    ordinal of the month

    dom

  34. case class OrdinalWeekLocator(o: Either[Int, Last.type], dow: DayOfWeek) extends Locator with DayOfMonthSupport with DayOfYearSupport with Product with Serializable

    works for Monthly and Yearly patterns

  35. trait Pattern extends AnyRef

    recurrence pattern

  36. case class Period(start: Date, end: Date) extends Product with Serializable

    start

    period start date inclusive

    end

    period end date inclusive

  37. trait PeriodBuilder extends AnyRef

    build period based on schedule start / end date and period end days

  38. case class Schedule(periods: List[Period], dateDefs: List[DateDef]) extends Product with Serializable

  39. class Schedule4j extends AnyRef

  40. trait Selector extends AnyRef

    once we shifted, how we are going to select the date to use

  41. trait Shifter extends AnyRef

    how we are going to shift relative to the anchor date

  42. case class SimpleHolidayRule(holidays: Set[Date]) extends HolidayRule with Product with Serializable

  43. case class StubRulePeriodBuilder(startRule: StartRule = NoStartRule, endRule: EndRule = NoEndRule) extends PeriodBuilder with Product with Serializable

    build periods based on stub rules

    build periods based on stub rules

    startRule
    endRule

  44. case class WeekDuration(n: Int) extends Duration with Product with Serializable

  45. case class Weekly(step: Int, dowOpt: Option[DayOfWeek] = None) extends Pattern with Product with Serializable

    step

    number of weeks for each step

    dowOpt

  46. case class YearDuration(n: Int) extends Duration with Product with Serializable

  47. case class Yearly(step: Int, doyOpt: Option[DayOfYear] = None) extends Pattern with Product with Serializable

Value Members

  1. object Anchor

  2. object April extends Month with Product with Serializable

  3. object August extends Month with Product with Serializable

  4. object CompositeHolidayRule extends Serializable

  5. object Date extends Serializable

  6. object DateDef extends Serializable

  7. object DayOfMonth

  8. object DayOfWeek

  9. object DayOfYear

  10. object December extends Month with Product with Serializable

  11. object February extends Month with Product with Serializable

  12. object Friday extends DayOfWeek with Product with Serializable

  13. object HolidayRule

  14. object January extends Month with Product with Serializable

  15. object JavaDateUtil

    all operations requiring java.

    all operations requiring java.util.Date are maintained here

  16. object July extends Month with Product with Serializable

  17. object June extends Month with Product with Serializable

  18. object Locator

  19. object March extends Month with Product with Serializable

  20. object May extends Month with Product with Serializable

  21. object Monday extends DayOfWeek with Product with Serializable

  22. object Month

  23. object Monthly extends Serializable

  24. object NoHoliday extends HolidayRule with Product with Serializable

  25. object November extends Month with Product with Serializable

  26. object October extends Month with Product with Serializable

  27. object Pattern

  28. object Period extends Serializable

  29. object Saturday extends DayOfWeek with Product with Serializable

  30. object Schedule extends Serializable

  31. object Selector

  32. object September extends Month with Product with Serializable

  33. object Shifter

  34. object SimpleHolidayRule extends Serializable

  35. object StubRulePeriodBuilder extends Serializable

  36. object Sunday extends DayOfWeek with Product with Serializable

  37. object Thursday extends DayOfWeek with Product with Serializable

  38. object Tuesday extends DayOfWeek with Product with Serializable

  39. object Wednesday extends DayOfWeek with Product with Serializable

  40. object Weekends extends HolidayRule with Product with Serializable

    consider all weekend as holiday

  41. object Weekly extends Serializable

  42. object Yearly extends Serializable

  43. object day

  44. implicit def dayDurationToDailyPattern(d: DayDuration): Daily

  45. implicit def isoStrToDate(isoStr: String): Date

  46. val lastDay: OrdinalLocator

  47. val lastFriday: OrdinalWeekLocator

  48. val lastMonday: OrdinalWeekLocator

  49. val lastSaturday: OrdinalWeekLocator

  50. val lastSunday: OrdinalWeekLocator

  51. val lastThursday: OrdinalWeekLocator

  52. val lastTuesday: OrdinalWeekLocator

  53. val lastWednesday: OrdinalWeekLocator

  54. val month: MonthDuration

  55. implicit def monthDurationToMonthlyPattern(d: MonthDuration): Monthly

  56. implicit def tupleToDate(t: (Int, Int, Int)): Date

  57. val week: WeekDuration

  58. implicit def weekDurationToWeeklyPattern(d: WeekDuration): Weekly

  59. implicit def weekdayToLocator(weekday: DayOfWeek): OrdinalLocator

  60. val year: YearDuration

  61. implicit def yearDurationToYearlyPattern(d: YearDuration): Yearly

Inherited from AnyRef

Inherited from Any

Ungrouped