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

main.shark.internal.hppc.Tuples.kt Maven / Gradle / Ivy

There is a newer version: 3.0-alpha-8
Show newest version
package shark.internal.hppc

/** Alternative to Pair that doesn't box long.*/
internal data class LongObjectPair(
  val first: Long,
  val second: B
)

/** Alternative to Pair that doesn't box int.*/
internal data class IntObjectPair(
  val first: Int,
  val second: B
)

/** Alternative to Pair that doesn't box longs. */
internal data class LongLongPair(
  val first: Long,
  val second: Long
)

internal infix fun  Long.to(that: B): LongObjectPair = LongObjectPair(this, that)

internal infix fun  Int.to(that: B): IntObjectPair = IntObjectPair(this, that)

internal infix fun Long.to(that: Long): LongLongPair = LongLongPair(this, that)