scala-unsigned


License

License

Categories

Categories

Scala Languages
GroupId

GroupId

default
ArtifactId

ArtifactId

scala-unsigned_2.11
Last Version

Last Version

0.1
Release Date

Release Date

Type

Type

jar
Description

Description

scala-unsigned
scala-unsigned
Project URL

Project URL

https://github.com/ivtoskov/scala-unsigned
Project Organization

Project Organization

default
Source Code Management

Source Code Management

https://github.com/ivtoskov/scala-unsigned

Download scala-unsigned_2.11

How to add to project

<!-- https://jarcasting.com/artifacts/default/scala-unsigned_2.11/ -->
<dependency>
    <groupId>default</groupId>
    <artifactId>scala-unsigned_2.11</artifactId>
    <version>0.1</version>
</dependency>
// https://jarcasting.com/artifacts/default/scala-unsigned_2.11/
implementation 'default:scala-unsigned_2.11:0.1'
// https://jarcasting.com/artifacts/default/scala-unsigned_2.11/
implementation ("default:scala-unsigned_2.11:0.1")
'default:scala-unsigned_2.11:jar:0.1'
<dependency org="default" name="scala-unsigned_2.11" rev="0.1">
  <artifact name="scala-unsigned_2.11" type="jar" />
</dependency>
@Grapes(
@Grab(group='default', module='scala-unsigned_2.11', version='0.1')
)
libraryDependencies += "default" % "scala-unsigned_2.11" % "0.1"
[default/scala-unsigned_2.11 "0.1"]

Dependencies

compile (1)

Group / Artifact Type Version
org.scala-lang : scala-library jar 2.11.2

test (1)

Group / Artifact Type Version
org.scalacheck : scalacheck_2.11 jar 1.10.1

Project Modules

There are no modules declared in this project.

Passera

This is an implementation of unsigned integers for Scala. This is still very much a work in progress.
Much of it was written a while ago as an exercise in learning Scala.

The library provides:

  • UInt
  • ULong
  • UByte
  • UShort

The classes are implemented by boxing Int, Long, Byte, Short, respectively.

To use:

scala> import ch.ethz.acl.passera.unsigned._

scala> (-1).toUInt
res0: ch.ethz.acl.passera.unsigned.UInt = 4294967295

scala> res0 + 1
res1: Int = 0

Credits

The code was written by Nate Nystrom ([email protected]).

TODO

Add support for value classes.

Refactor code to remove redundant ULong code.

More tests.

Versions

Version
0.1