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. class DateRange extends IndexedSeq[Date]

    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)
  10. class DateRangeBuilder extends IndexedSeq[Date]

    Permalink

    builder class to manipulate DateRange

  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. sealed trait Locator extends AnyRef

    Permalink

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

  31. implicit class LocatorImplicit extends AnyRef

    Permalink
  32. class Locators extends AnyRef

    Permalink
  33. final class Month extends Enum[Month]

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

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

    Permalink

    step

    number of months for each recurring step

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

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

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

  39. trait Pattern extends AnyRef

    Permalink

    recurrence pattern

  40. class Patterns extends AnyRef

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

    Permalink

    start

    period start date inclusive

    end

    period end date inclusive

  42. trait PeriodBuilder extends AnyRef

    Permalink

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

  43. final class Quarter extends Enum[Quarter]

    Permalink
  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 DateRange

    Permalink
  8. object DateRangeBuilder

    Permalink
  9. object DayOfMonth

    Permalink
  10. object DayOfYear

    Permalink
  11. val December: Month

    Permalink
  12. val February: Month

    Permalink
  13. val Friday: DayOfWeek

    Permalink
  14. object HolidayRule

    Permalink
  15. val January: Month

    Permalink
  16. val July: Month

    Permalink
  17. val June: Month

    Permalink
  18. object Locator

    Permalink
  19. val March: Month

    Permalink
  20. val May: Month

    Permalink
  21. val Monday: DayOfWeek

    Permalink
  22. object Monthly extends Serializable

    Permalink
  23. object NoHoliday extends HolidayRule with Product with Serializable

    Permalink
  24. val November: Month

    Permalink
  25. val October: Month

    Permalink
  26. object Pattern

    Permalink
  27. object Period extends Serializable

    Permalink
  28. val Saturday: DayOfWeek

    Permalink
  29. object Schedule extends Serializable

    Permalink
  30. object Selector

    Permalink
  31. val September: Month

    Permalink
  32. object Shifter

    Permalink
  33. object SimpleHolidayRule extends Serializable

    Permalink
  34. object StubRulePeriodBuilder extends Serializable

    Permalink
  35. val Sunday: DayOfWeek

    Permalink
  36. val Thursday: DayOfWeek

    Permalink
  37. val Tuesday: DayOfWeek

    Permalink
  38. val Wednesday: DayOfWeek

    Permalink
  39. object Weekends extends HolidayRule with Product with Serializable

    Permalink

    consider all weekend as holiday

  40. object Weekly extends Serializable

    Permalink
  41. object Yearly extends Serializable

    Permalink
  42. object day

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

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

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

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

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

    Permalink
  48. val lastDay: OrdinalLocator

    Permalink
  49. val lastFriday: OrdinalWeekLocator

    Permalink
  50. val lastMonday: OrdinalWeekLocator

    Permalink
  51. val lastSaturday: OrdinalWeekLocator

    Permalink
  52. val lastSunday: OrdinalWeekLocator

    Permalink
  53. val lastThursday: OrdinalWeekLocator

    Permalink
  54. val lastTuesday: OrdinalWeekLocator

    Permalink
  55. val lastWednesday: OrdinalWeekLocator

    Permalink
  56. val month: MonthDuration

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

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

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

    Permalink
  60. val week: WeekDuration

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

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

    Permalink
  63. val year: YearDuration

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

    Permalink

Inherited from AnyRef

Inherited from Any

Ungrouped