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

com.avsystem.commons.misc.CrossUtils.scala Maven / Gradle / Ivy

There is a newer version: 2.22.0
Show newest version
package com.avsystem.commons
package misc

object CrossUtils {
  type NativeArray[A] = Array[A]
  type NativeDict[A] = MMap[String, A]

  def newNativeArray[A: ClassTag](size: Int): NativeArray[A] = new Array[A](size)
  def newNativeDict[A]: NativeDict[A] = new MHashMap[String, A]
  def unsetArrayValue: Any = null

  def wrappedArray[A: ClassTag](elems: A*): MIndexedSeq[A] = Array(elems: _*)
  def arrayBuffer[A]: MIndexedSeq[A] with MBuffer[A] = new MArrayBuffer[A]
  def dictionary[A](keyValues: (String, A)*): MMap[String, A] = MHashMap[String, A](keyValues: _*)
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy