final case class TemporalOps(underlying: Temporal) extends AnyVal with Product with Serializable
- Alphabetic
- By Inheritance
- TemporalOps
- Serializable
- Serializable
- Product
- Equals
- AnyVal
- Any
- by any2stringadd
- by StringFormat
- by Ensuring
- by ArrowAssoc
- Hide All
- Show All
- Public
- All
Instance Constructors
- new TemporalOps(underlying: Temporal)
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- Any
-
final
def
##(): Int
- Definition Classes
- Any
-
def
+(amount: Long, unit: TemporalUnit): underlying.type
Obtains an object of the same type as this object with an amount added.
Obtains an object of the same type as this object with an amount added.
- Exceptions thrown
ArithmeticException
- if numeric overflow occurs.DateTimeException
- if the unit cannot be added.UnsupportedTemporalTypeException
- if the unit is not supported.
-
def
+(amount: TemporalAmount): underlying.type
Obtains an object of the same type as this object with an amount added.
Obtains an object of the same type as this object with an amount added.
- Exceptions thrown
ArithmeticException
- if numeric overflow occurs.DateTimeException
- if the addition cannot be made.
-
def
-(amount: Long, unit: TemporalUnit): underlying.type
Obtains an object of the same type as this object with an amount subtracted.
Obtains an object of the same type as this object with an amount subtracted.
- Exceptions thrown
ArithmeticException
- if numeric overflow occursDateTimeException
- if the unit cannot be subtractedUnsupportedTemporalTypeException
- if the unit is not supported
-
def
-(amount: TemporalAmount): underlying.type
Obtains an object of the same type as this object with an amount subtracted.
Obtains an object of the same type as this object with an amount subtracted.
- Exceptions thrown
ArithmeticException
- if numeric overflow occursDateTimeException
- if the subtraction cannot be made
-
def
->[B](y: B): (TemporalOps, B)
- Implicit
- This member is added by an implicit conversion from TemporalOps to ArrowAssoc[TemporalOps] performed by method ArrowAssoc in scala.Predef.
- Definition Classes
- ArrowAssoc
- Annotations
- @inline()
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- Any
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
ensuring(cond: (TemporalOps) ⇒ Boolean, msg: ⇒ Any): TemporalOps
- Implicit
- This member is added by an implicit conversion from TemporalOps to Ensuring[TemporalOps] performed by method Ensuring in scala.Predef.
- Definition Classes
- Ensuring
-
def
ensuring(cond: (TemporalOps) ⇒ Boolean): TemporalOps
- Implicit
- This member is added by an implicit conversion from TemporalOps to Ensuring[TemporalOps] performed by method Ensuring in scala.Predef.
- Definition Classes
- Ensuring
-
def
ensuring(cond: Boolean, msg: ⇒ Any): TemporalOps
- Implicit
- This member is added by an implicit conversion from TemporalOps to Ensuring[TemporalOps] performed by method Ensuring in scala.Predef.
- Definition Classes
- Ensuring
-
def
ensuring(cond: Boolean): TemporalOps
- Implicit
- This member is added by an implicit conversion from TemporalOps to Ensuring[TemporalOps] performed by method Ensuring in scala.Predef.
- Definition Classes
- Ensuring
-
def
formatted(fmtstr: String): String
- Implicit
- This member is added by an implicit conversion from TemporalOps to StringFormat[TemporalOps] performed by method StringFormat in scala.Predef.
- Definition Classes
- StringFormat
- Annotations
- @inline()
-
def
from(begin: Temporal, inUnits: TemporalUnit): Long
Calculates the amount of time until this temporal in terms of the specified unit.
Calculates the amount of time until this temporal in terms of the specified unit.
- Exceptions thrown
ArithmeticException
- if numeric overflow occurs.DateTimeException
- if the amount cannot be calculated, or the end temporal cannot be converted to the same type as this temporal.UnsupportedTemporalTypeException
- if the unit is not supported.
-
def
getClass(): Class[_ <: AnyVal]
- Definition Classes
- AnyVal → Any
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- val underlying: Temporal
-
def
~=(field: TemporalField, fieldValue: Long): underlying.type
Obtains an adjusted object of the same type as this object with the adjustment made.
Obtains an adjusted object of the same type as this object with the adjustment made.
- Exceptions thrown
ArithmeticException
- if numeric overflow occursDateTimeException
- if the field cannot be setUnsupportedTemporalTypeException
- if the field is not supported
-
def
~=(adjuster: TemporalAdjuster): underlying.type
Obtains an adjusted object of the same type as this object with the adjustment made.
Obtains an adjusted object of the same type as this object with the adjustment made.
- Exceptions thrown
ArithmeticException
- if numeric overflow occursDateTimeException
- if unable to make the adjustment
-
def
→[B](y: B): (TemporalOps, B)
- Implicit
- This member is added by an implicit conversion from TemporalOps to ArrowAssoc[TemporalOps] performed by method ArrowAssoc in scala.Predef.
- Definition Classes
- ArrowAssoc
Shadowed Implicit Value Members
-
def
+(other: String): String
- Implicit
- This member is added by an implicit conversion from TemporalOps to any2stringadd[TemporalOps] 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:(temporalOps: any2stringadd[TemporalOps]).+(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: