io.github.scala_tessella.ring_seq.examples.Ring
class Ring[
A](
underlying:
Seq[
A],
var headIndex:
IndexO,
var isReflected:
Boolean)
An example class wrapping a sequence and keeping a mutable state of rotation and reflection
Type parameters
-
A
-
the type of the elements in the sequence
Value parameters
-
headIndex
-
mutable state of rotation, a circular index of the sequence head
-
isReflected
-
mutable state of reflection
-
underlying
-
the wrapped sequence
Attributes
-
Graph
-
-
Supertypes
-
class Object
trait Matchable
class Any
Members list
Gets the sequence at the current state of rotation and reflection.
Gets the sequence at the current state of rotation and reflection.
Attributes
-
Returns
-
the rotated and reflected sequence.
Gets the head element of the sequence at the current state of rotation and reflection.
Gets the head element of the sequence at the current state of rotation and reflection.
Attributes
-
Returns
-
the element at the head of the rotated and reflected sequence.
Adds a reflection, the sequence is considered as flowing in the opposite direction.
Adds a reflection, the sequence is considered as flowing in the opposite direction.
Attributes
Adds a rotation to the left by some steps.
Adds a rotation to the left by some steps.
Value parameters
-
step
-
Int
Attributes
Adds a rotation to the right by some steps.
Adds a rotation to the right by some steps.
Value parameters
-
step
-
Int
Attributes