Scoop API

scoop:scoop.core:0.1.0

src/operators_assign.scoop

Selected production source · src/operators_assign.scoop

1/**
2 * The generic operator contract used for `a += b`. Operand and result types are chosen by the
3 * implementation.
4 */
5public interface AddAssign<Rhs> {
6 /**
7 * Implements `a += b` for this receiver; domain restrictions and failure behavior belong to
8 * the implementing type.
9 */
10 public operator fun plusAssign(other: Rhs): Unit
13/**
14 * The generic operator contract used for `a -= b`. Operand and result types are chosen by the
15 * implementation.
16 */
17public interface SubAssign<Rhs> {
18 /**
19 * Implements `a -= b` for this receiver; domain restrictions and failure behavior belong to
20 * the implementing type.
21 */
22 public operator fun minusAssign(other: Rhs): Unit
25/**
26 * The generic operator contract used for `a *= b`. Operand and result types are chosen by the
27 * implementation.
28 */
29public interface MulAssign<Rhs> {
30 /**
31 * Implements `a *= b` for this receiver; domain restrictions and failure behavior belong to
32 * the implementing type.
33 */
34 public operator fun timesAssign(other: Rhs): Unit
37/**
38 * The generic operator contract used for `a /= b`. Operand and result types are chosen by the
39 * implementation.
40 */
41public interface DivAssign<Rhs> {
42 /**
43 * Implements `a /= b` for this receiver; domain restrictions and failure behavior belong to
44 * the implementing type.
45 */
46 public operator fun divAssign(other: Rhs): Unit
49/**
50 * The generic operator contract used for `a %= b`. Operand and result types are chosen by the
51 * implementation.
52 */
53public interface RemAssign<Rhs> {
54 /**
55 * Implements `a %= b` for this receiver; domain restrictions and failure behavior belong to
56 * the implementing type.
57 */
58 public operator fun remAssign(other: Rhs): Unit