ImmutableOffsetSuppliedPos

open class ImmutableOffsetSuppliedPos(parent: Pos, p: Int, offset: Supplier<Int>) : Pos.SuppliedPos

A relative Pos wth an offset supplier and a constant offset. Offsets a parent Pos. This position is immutable in the direct sense. Mutation of this pos via set, inc, and dec does not affect position.

Author

fzzyhmstrs

Since

0.7.2

Parameters

parent

Pos - the Pos this is relative to

p

Int - constant numeric offset

offset

Supplier - the supplied offset compared to the parent

Constructors

Link copied to clipboard
constructor(parent: Pos, p: Int, offset: Supplier<Int>)

Types

Link copied to clipboard
object Companion

Functions

Link copied to clipboard
open override fun dec(amount: Int)

Decrements this position by the given amount

Link copied to clipboard
open operator fun div(other: Pos): Int
Link copied to clipboard
open override fun get(): Int

Returns the position of this pos

Link copied to clipboard
open override fun inc(amount: Int)

Increments this position by the given amount

Link copied to clipboard
open operator fun minus(other: Pos): Int
Link copied to clipboard
open override fun offset(): Int
Link copied to clipboard
open override fun parent(): Pos
Link copied to clipboard
open operator fun plus(other: Pos): Int
Link copied to clipboard
open operator fun rem(other: Pos): Int
Link copied to clipboard
open override fun set(new: Int)

Sets the position of this pos

Link copied to clipboard
open override fun supplier(): Supplier<Int>
Link copied to clipboard
open operator fun times(other: Pos): Int
Link copied to clipboard
open override fun toString(): String