sealed trait Bounds[+A] extends Product with Serializable
Represents a region of discrete space, bounding it by minimum and maximum points. The bounds maybe EmptyBounds as result of intersection operation.
The dimensionality of region is implied by the dimensionality of type parameter A. Boundable typeclass is required to manipulate instance of A.
Conceptually this ADT is similar Option[KeyBounds[A]]
but adds methods convenient
for testing and forming region intersection, union and mutation.
- A
Type of keys, or points in descrete space
- Alphabetic
- By Inheritance
- Bounds
- Serializable
- Serializable
- Product
- Equals
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Abstract Value Members
-
abstract
def
canEqual(that: Any): Boolean
- Definition Classes
- Equals
-
abstract
def
combine[B >: A](other: Bounds[B])(implicit b: Boundable[B]): Bounds[B]
Combine two regions by creating a region that covers both regions fully
-
abstract
def
contains[B >: A](other: Bounds[B])(implicit b: Boundable[B]): Boolean
Test if other bounds are fully contained by this bounds.
Test if other bounds are fully contained by this bounds. EmptyBounds contain no other bounds but are contained by all non-empty bounds.
-
abstract
def
get: KeyBounds[A]
Returns non-empty bounds or throws NoSuchElementException
-
abstract
def
include[B >: A](key: B)(implicit b: Boundable[B]): KeyBounds[B]
Expand bounds to include the key or keep unchanged if it is already included
-
abstract
def
includes[B >: A](key: B)(implicit b: Boundable[B]): Boolean
Test if the key is included in bounds
-
abstract
def
intersect[B >: A](other: Bounds[B])(implicit b: Boundable[B]): Bounds[B]
Returns the intersection, if any, between two bounds
-
abstract
def
isEmpty: Boolean
Returns true if this is EmptyBounds
-
abstract
def
productArity: Int
- Definition Classes
- Product
-
abstract
def
productElement(n: Int): Any
- Definition Classes
- Product
-
abstract
def
setSpatialBounds[B >: A](other: KeyBounds[SpatialKey])(implicit ev: SpatialComponent[B]): Bounds[B]
Updates the spatial region of bounds to match that of the argument, leaving other dimensions, if any, unchanged.
- abstract def toOption: Option[KeyBounds[A]]
Concrete Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
final
def
flatMap[B](f: (KeyBounds[A]) ⇒ Bounds[B]): Bounds[B]
Returns the result of applying f to this Bounds minKey and maxKey if this it is nonempty.
Returns the result of applying f to this Bounds minKey and maxKey if this it is nonempty. The minKey and maxKeys are given as instance of KeyBounds instead of a tuple. If this Bounds is EmptyBounds it is returned unchanged.
- Annotations
- @inline()
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
def
getOrElse[B >: A](default: ⇒ KeyBounds[B]): KeyBounds[B]
Returns non-empty bounds or the default value
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
def
intersects[B >: A](other: KeyBounds[B])(implicit b: Boundable[B]): Boolean
Test if two bounds for intersection
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
nonEmpty: Boolean
Returns false if this is EmptyBounds
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
def
productIterator: Iterator[Any]
- Definition Classes
- Product
-
def
productPrefix: String
- Definition Classes
- Product
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()