Package

com.xiaomi.duckling.dimension.time

duration

Permalink

package duration

Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. duration
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Type Members

  1. case class DurationData(value: Int, grain: Grain, latent: Boolean = false, fuzzy: Boolean = false, schema: Option[String] = None) extends ResolvedValue with Resolvable with Product with Serializable

    Permalink

    时间段

    时间段

    value

    时长

    grain

    时长单位

    latent

    是否是潜在时间

    fuzzy

    是否是模糊时间(几天)

  2. trait Rules extends DimRules

    Permalink

Value Members

  1. object Duration extends Dimension with Rules with Product with Serializable

    Permalink
  2. def durationSchema(d1: DurationData, d2: DurationData): Option[String]

    Permalink
  3. def durationSchema(value: String, grain: Grain): Option[String]

    Permalink
  4. def isADecade: Predicate

    Permalink
  5. def isFuzzyNotLatentDuration: Predicate

    Permalink
  6. def isMonth: Predicate

    Permalink
  7. def isNotLatentDuration: Predicate

    Permalink
  8. def isNotLatentGrain: Predicate

    Permalink
  9. def timesOneAndAHalf(grain: Grain, n: Int): Option[DurationData]

    Permalink
  10. def tt(v: Int, g: Grain): Token

    Permalink

    generate duration token

    generate duration token

    v

    duration value

    g

    duration grain

  11. def withGrain(g: Grain, d: DurationData): DurationData

    Permalink

    Convert a duration to the given grain, rounded to the nearest integer.

    Convert a duration to the given grain, rounded to the nearest integer. For example, 1 month is converted to 4 weeks.

Inherited from AnyRef

Inherited from Any

Ungrouped