All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.powerscala.property.ListSetProperty.scala Maven / Gradle / Ivy

The newest version!
package org.powerscala.property

import scala.collection.immutable.ListSet

/**
 * @author Matt Hicks 
 */
trait ListSetProperty[T] extends Property[ListSet[T]] {
  def +=(t: T) = this := value + t
  def -=(t: T) = this := value - t
  def isEmpty = value.isEmpty
  def nonEmpty = value.nonEmpty
  def ++=(seq: Seq[T]) = this := value ++ seq
  def contains(t: T) = value.contains(t)

  def :=(seq: Seq[T]) = apply(ListSet(seq: _*))
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy