trait CollectionFormats extends AnyRef
Support for anything with a CanBuildFrom.
- Self Type
- CollectionFormats with BasicFormats
- Alphabetic
- By Inheritance
- CollectionFormats
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
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[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @native() @throws( ... )
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
finalize(): Unit
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
- implicit def genMapFormat[M[_, _], K, V](implicit ev: <:<[M[K, V], GenMap[K, V]], cbf: CanBuildFrom[M[K, V], (K, V), M[K, V]], kf: SexpFormat[K], vf: SexpFormat[V]): SexpFormat[M[K, V]]
- implicit def genTraversableFormat[T[_], E](implicit evidence: <:<[T[E], GenTraversable[E]], cbf: CanBuildFrom[T[E], E, T[E]], ef: SexpFormat[E]): SexpFormat[T[E]]
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- implicit def numericRangeFormat[E](implicit nf: SexpFormat[E], int: Integral[E]): SexpFormat[NumericRange[E]]
-
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
- @native() @throws( ... )
-
implicit
object
BitSetFormat extends SexpFormat[BitSet]
We only support deserialisation via
im.BitSetas the general case requires going through a proxy to convert the bitmask into elements that can be read viaCanBuildFrom.We only support deserialisation via
im.BitSetas the general case requires going through a proxy to convert the bitmask into elements that can be read viaCanBuildFrom. If you have your own (possibly compressed) implementation ofBitSetyou will need to provide your own format.We encode the
BigIntform as a String using emacscalc-evalnotation (radix is part of the string). SeeViaBigDecimalFormatfor a longer discussion about emacs number formats.This can potentially be used in Emacs using the following (which will parse the strings into big ints every time it is queried, so it's not particularly efficient):
(require 'calc) (defmath bitsetAnd (bitset i) (logand (lsh 1 i (+ 1 i)) bitset (+ 1 i))) (defun bitsetContains (bitset i) (not (string= "0" (calc-eval "bitsetAnd($, $$)" 'num bitset i))))
(bitsetContains "10#3" 0) ; 't (bitsetContains "10#3" 1) ; 't (bitsetContains "10#3" 2) ; nil (bitsetContains "32#10000000000000001" 0) ; t (bitsetContains "16#10000000000000001" 64) ; t (bitsetContains "16#10000000000000002" 1) ; t (bitsetContains "16#10000000000000002" 64) ; t (bitsetContains "16#10000000000000002" 0) ; nil
- implicit object ImBitSetFormat extends SexpFormat[BitSet]
- implicit object RangeFormat extends SexpFormat[Range]