Class/Object

it.unich.scalafix

Box

Related Docs: object Box | package scalafix

Permalink

abstract class Box[V] extends (V, V) ⇒ V

A Box is a way to combine two values into a new one. It is a specialization of the functional type (V,V) => V, where the first parameter is the old value of an unknown and the second parameter is the new contribution. Both widenings and narrowings are examples of boxes. Boxes are mutable, i.e., the apply method may give different results for the same input when called multiple times.

Another function of boxes is to be blueprints for building other equivalent boxes. Each box has a copy method which should produce a functionally equivalent copy of this. The copy method should try to minimize object duplication.

V

the type of the values to combine.

Linear Supertypes
(V, V) ⇒ V, AnyRef, Any
Known Subclasses
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Box
  2. Function2
  3. AnyRef
  4. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new Box()

    Permalink

Abstract Value Members

  1. abstract def apply(v1: V, v2: V): V

    Permalink
    Definition Classes
    Function2
  2. abstract def copy: Box[V]

    Permalink

    Returns a copy of this box.

    Returns a copy of this box. An immutable box may just returns itself, but a mutable one should produce a distinct a copy of itself.

  3. abstract def isIdempotent: Boolean

    Permalink

    It returns true if the box is guaranteed to be idempotent, i.e., if x box y = (x box y) box y.

    It returns true if the box is guaranteed to be idempotent, i.e., if x box y = (x box y) box y. This may be used for optimization purposes.

  4. abstract def isImmutable: Boolean

    Permalink

    It returns true if this box is immutable, i.e., if the apply method does not change its behaviour over time.

  5. abstract def isRight: Boolean

    Permalink

    It returns true if this is guaranteed to be the right box (i.e., the one which always returns the second component).

    It returns true if this is guaranteed to be the right box (i.e., the one which always returns the second component). This may be used for optimization purposes.

Concrete Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  5. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  6. def curried: (V) ⇒ (V) ⇒ V

    Permalink
    Definition Classes
    Function2
    Annotations
    @unspecialized()
  7. def delayed(delay: Int): Box[V]

    Permalink

    Returns a delayed version of the box.

    Returns a delayed version of the box. It is equivalent to applying cascade to the right box.

  8. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  9. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  10. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  11. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  12. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  13. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  14. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  15. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  16. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  17. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  18. def toString(): String

    Permalink
    Definition Classes
    Function2 → AnyRef → Any
  19. def tupled: ((V, V)) ⇒ V

    Permalink
    Definition Classes
    Function2
    Annotations
    @unspecialized()
  20. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  21. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  22. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from (V, V) ⇒ V

Inherited from AnyRef

Inherited from Any

Ungrouped