Package

io

lamma

Permalink

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
Visibility
  1. Public
  2. All

Type Members

  1. sealed trait Anchor extends AnyRef

    Permalink

    relative to which anchor date?

  2. class Anchors extends AnyRef

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

    Permalink

    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

    Permalink

    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

    Permalink

    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

    Permalink

    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

    Permalink
  8. class DateDefs extends AnyRef

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

    Permalink

    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 IndexedSeq[Date] with Product with Serializable

    Permalink

    builder class to manipulate DateRange

    builder class to manipulate DateRange

    from

    from date

    to

    to date

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

    Permalink

    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

    Permalink
  13. class Dates extends AnyRef

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

    Permalink
  15. trait DayOfMonth extends AnyRef

    Permalink

    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

    Permalink
  17. class DayOfMonths extends AnyRef

    Permalink
  18. final class DayOfWeek extends Enum[DayOfWeek]

    Permalink
  19. sealed trait DayOfWeekSupport extends AnyRef

    Permalink
  20. trait DayOfYear extends AnyRef

    Permalink

    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

    Permalink
  22. class DayOfYears extends AnyRef

    Permalink
  23. final class Direction extends Enum[Direction]

    Permalink
  24. sealed trait Duration extends AnyRef

    Permalink
  25. implicit class DurationInt extends AnyRef

    Permalink
  26. abstract class HolidayRule extends AnyRef

    Permalink

    abstract class is used instead of trait

    abstract class is used instead of trait

    otherwise it's not quite java friendly https://github.com/maxcellent/lamma/issues/4

  27. class HolidayRules extends AnyRef

    Permalink
  28. class InvalidDayOfMonthException extends RuntimeException

    Permalink
  29. class InvalidDayOfYearException extends RuntimeException

    Permalink
  30. class LammaJavaImports extends AnyRef

    Permalink
  31. sealed trait Locator extends AnyRef

    Permalink

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

  32. implicit class LocatorImplicit extends AnyRef

    Permalink
  33. class Locators extends AnyRef

    Permalink
  34. final class Month extends Enum[Month]

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

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

    Permalink

    step

    number of months for each recurring step

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

    Permalink

    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

    Permalink

    works for Yearly pattern only

    works for Yearly pattern only

    o

    ordinal of the month

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

    Permalink

    works for Monthly and Yearly patterns

  40. trait Pattern extends AnyRef

    Permalink

    recurrence pattern

  41. class Patterns extends AnyRef

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

    Permalink

    start

    period start date inclusive

    end

    period end date inclusive

  43. trait PeriodBuilder extends AnyRef

    Permalink

    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

    Permalink
  45. class Schedule4j extends AnyRef

    Permalink
  46. trait Selector extends AnyRef

    Permalink

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

  47. class Selectors extends AnyRef

    Permalink
  48. trait Shifter extends AnyRef

    Permalink

    how we are going to shift relative to the anchor date

  49. class Shifters extends AnyRef

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

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

    Permalink

    stub rule based period builders

  52. class StubRulePeriodBuilders extends AnyRef

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

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

    Permalink

    step

    number of weeks for each step

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

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

    Permalink

Value Members

  1. object Anchor

    Permalink
  2. val April: Month

    Permalink
  3. val August: Month

    Permalink
  4. object CompositeHolidayRule extends Serializable

    Permalink
  5. object Date extends Serializable

    Permalink
  6. object DateDef extends Serializable

    Permalink
  7. object DayOfMonth

    Permalink
  8. object DayOfYear

    Permalink
  9. val December: Month

    Permalink
  10. val February: Month

    Permalink
  11. val Friday: DayOfWeek

    Permalink
  12. object HolidayRule

    Permalink
  13. val January: Month

    Permalink
  14. val July: Month

    Permalink
  15. val June: Month

    Permalink
  16. object Locator

    Permalink
  17. val March: Month

    Permalink
  18. val May: Month

    Permalink
  19. val Monday: DayOfWeek

    Permalink
  20. object Monthly extends Serializable

    Permalink
  21. object NoHoliday extends HolidayRule with Product with Serializable

    Permalink
  22. val November: Month

    Permalink
  23. val October: Month

    Permalink
  24. object Pattern

    Permalink
  25. object Period extends Serializable

    Permalink
  26. val Saturday: DayOfWeek

    Permalink
  27. object Schedule extends Serializable

    Permalink
  28. object Selector

    Permalink
  29. val September: Month

    Permalink
  30. object Shifter

    Permalink
  31. object SimpleHolidayRule extends Serializable

    Permalink
  32. object StubRulePeriodBuilder extends Serializable

    Permalink
  33. val Sunday: DayOfWeek

    Permalink
  34. val Thursday: DayOfWeek

    Permalink
  35. val Tuesday: DayOfWeek

    Permalink
  36. val Wednesday: DayOfWeek

    Permalink
  37. object Weekends extends HolidayRule with Product with Serializable

    Permalink

    consider all weekend as holiday

  38. object Weekly extends Serializable

    Permalink
  39. object Yearly extends Serializable

    Permalink
  40. object day

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

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

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

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

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

    Permalink
  46. val lastDay: OrdinalLocator

    Permalink
  47. val lastFriday: OrdinalWeekLocator

    Permalink
  48. val lastMonday: OrdinalWeekLocator

    Permalink
  49. val lastSaturday: OrdinalWeekLocator

    Permalink
  50. val lastSunday: OrdinalWeekLocator

    Permalink
  51. val lastThursday: OrdinalWeekLocator

    Permalink
  52. val lastTuesday: OrdinalWeekLocator

    Permalink
  53. val lastWednesday: OrdinalWeekLocator

    Permalink
  54. val month: MonthDuration

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

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

    Permalink
  57. implicit def tuplesToDates(t: ((Int, Int, Int), (Int, Int, Int))): (Date, Date)

    Permalink
  58. val week: WeekDuration

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

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

    Permalink
  61. val year: YearDuration

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

    Permalink

Inherited from AnyRef

Inherited from Any

Ungrouped