final case class PeriodOps(underlying: Period) extends AnyVal with Product with Serializable
- Alphabetic
- By Inheritance
- PeriodOps
- Serializable
- Serializable
- Product
- Equals
- AnyVal
- Any
- by any2stringadd
- by StringFormat
- by Ensuring
- by ArrowAssoc
- Hide All
- Show All
- Public
- All
Instance Constructors
- new PeriodOps(underlying: Period)
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- Any
-
final
def
##(): Int
- Definition Classes
- Any
-
def
*(scalar: Int): Period
Obtains a copy of this period multiplied by the scalar.
Obtains a copy of this period multiplied by the scalar.
- Exceptions thrown
ArithmeticException
- if numeric overflow occurs
-
def
+(amount: TemporalAmount): Period
Obtains a copy of this period with the specified period added.
Obtains a copy of this period with the specified period added.
- Exceptions thrown
ArithmeticException
- if numeric overflow occurs
-
def
-(amount: TemporalAmount): Period
Obtains a copy of this period with the specified period subtracted.
Obtains a copy of this period with the specified period subtracted.
- Exceptions thrown
ArithmeticException
- if numeric overflow occurs
- def ->[B](y: B): (PeriodOps, B)
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- Any
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
- def ensuring(cond: (PeriodOps) ⇒ Boolean, msg: ⇒ Any): PeriodOps
- def ensuring(cond: (PeriodOps) ⇒ Boolean): PeriodOps
- def ensuring(cond: Boolean, msg: ⇒ Any): PeriodOps
- def ensuring(cond: Boolean): PeriodOps
- def formatted(fmtstr: String): String
-
def
getClass(): Class[_ <: AnyVal]
- Definition Classes
- AnyVal → Any
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
def
unary_!: Period
Obtains an instance of this type with each amount in this period negated.
Obtains an instance of this type with each amount in this period negated. For example, a period of "2 years, -3 months and 4 days" will be negated to "-2 years, 3 months and -4 days". No normalization is performed.
- Exceptions thrown
ArithmeticException
- if numeric overflow occurs, which only happens if one of the units has the value Long.MIN_VALUE
- val underlying: Period
- def →[B](y: B): (PeriodOps, B)
Shadowed Implicit Value Members
-
def
+(other: String): String
- Implicit
- This member is added by an implicit conversion from PeriodOps to any2stringadd[PeriodOps] performed by method any2stringadd in scala.Predef.
- Shadowing
- This implicitly inherited member is shadowed by one or more members in this class.
To access this member you can use a type ascription:(periodOps: any2stringadd[PeriodOps]).+(other)
- Definition Classes
- any2stringadd
Scala Time
scala-time is a simple Scala wrapper for easier use JDK 1.8.0 (Java 8) time APIs
Overview
The library is contained in the scalatime package which includes extension methods provided via implicit conversion methods to Scala value classes.
For usage examples see below: