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. class Anchors extends AnyRef

  3. 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

  4. 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

  5. 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.

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

    header

    column header

    dates

    dates of the column, starting from top

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

  8. class DateDefs extends AnyRef

  9. 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?

  10. 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

  11. 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

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

  13. class Dates extends AnyRef

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

  15. trait DayOfMonth extends AnyRef

    This class locates one day in a month

    This class locates one day in a month

    For each DayOfMonth implementation, Lamma expect there is one and only one day match the criteria

  16. sealed trait DayOfMonthSupport extends AnyRef

  17. class DayOfMonths extends AnyRef

  18. class DayOfWeek extends Enum[DayOfWeek]

  19. sealed trait DayOfWeekSupport extends AnyRef

  20. trait DayOfYear extends AnyRef

    This class locates one day in a year

    This class locates one day in a year

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

  21. sealed trait DayOfYearSupport extends AnyRef

  22. class DayOfYears extends AnyRef

  23. class Direction extends Enum[Direction]

  24. sealed trait Duration extends AnyRef

  25. implicit class DurationInt extends AnyRef

  26. trait HolidayRule extends AnyRef

  27. class HolidayRules extends AnyRef

  28. class InvalidDayOfMonthException extends RuntimeException

  29. class InvalidDayOfYearException extends RuntimeException

  30. class LammaJavaImports extends AnyRef

  31. sealed trait Locator extends AnyRef

    Locator is used to generate DayOfWeek, DayOfMonth and DayOfYear depends on the context

  32. implicit class LocatorImplicit extends AnyRef

  33. class Locators extends AnyRef

  34. class Month extends Enum[Month]

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

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

    step

    number of months for each recurring step

    domOpt

  37. 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

  38. 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

  39. 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

  40. trait Pattern extends AnyRef

    recurrence pattern

  41. class Patterns extends AnyRef

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

    start

    period start date inclusive

    end

    period end date inclusive

  43. trait PeriodBuilder extends AnyRef

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

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

  45. class Schedule4j extends AnyRef

  46. trait Selector extends AnyRef

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

  47. class Selectors extends AnyRef

  48. trait Shifter extends AnyRef

    how we are going to shift relative to the anchor date

  49. class Shifters extends AnyRef

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

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

    stub rule based period builders

    stub rule based period builders

    startRule
    endRule

  52. class StubRulePeriodBuilders extends AnyRef

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

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

    step

    number of weeks for each step

    dowOpt

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

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

Value Members

  1. object Anchor

  2. val April: Month

  3. val August: Month

  4. object CompositeHolidayRule extends Serializable

  5. object Date extends Serializable

  6. object DateDef extends Serializable

  7. object DayOfMonth

  8. object DayOfYear

  9. val December: Month

  10. val February: Month

  11. val Friday: DayOfWeek

  12. object HolidayRule

  13. val January: Month

  14. val July: Month

  15. val June: Month

  16. object Locator

  17. val March: Month

  18. val May: Month

  19. val Monday: DayOfWeek

  20. object Monthly extends Serializable

  21. object NoHoliday extends HolidayRule with Product with Serializable

  22. val November: Month

  23. val October: Month

  24. object Pattern

  25. object Period extends Serializable

  26. val Saturday: DayOfWeek

  27. object Schedule extends Serializable

  28. object Selector

  29. val September: Month

  30. object Shifter

  31. object SimpleHolidayRule extends Serializable

  32. object StubRulePeriodBuilder extends Serializable

  33. val Sunday: DayOfWeek

  34. val Thursday: DayOfWeek

  35. val Tuesday: DayOfWeek

  36. val Wednesday: DayOfWeek

  37. object Weekends extends HolidayRule with Product with Serializable

    consider all weekend as holiday

  38. object Weekly extends Serializable

  39. object Yearly extends Serializable

  40. object day

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

  42. implicit def dayOfMonthSupportConversion(domSupport: DayOfMonthSupport): DayOfMonth

  43. implicit def dayOfWeekSupportConversion(dowSupport: DayOfWeekSupport): DayOfWeek

  44. implicit def dayOfYearSupportConversion(doySupport: DayOfYearSupport): DayOfYear

  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. implicit def tuplesToDates(t: ((Int, Int, Int), (Int, Int, Int))): (Date, Date)

  58. val week: WeekDuration

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

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

  61. val year: YearDuration

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

Inherited from AnyRef

Inherited from Any

Ungrouped