ed1f43bdfc
auto-unwrapping. git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4286 542714f4-19e9-0310-aa3c-eee0fc999fb1
40 lines
774 B
ActionScript
40 lines
774 B
ActionScript
package com.threerings.util {
|
|
|
|
/**
|
|
* Equivalent to java.lang.Long.
|
|
*/
|
|
public class Long
|
|
implements Equalable, Wrapped
|
|
{
|
|
public var high :int;
|
|
public var low :int;
|
|
|
|
public static function valueOf (low :int, high :int = 0) :Long
|
|
{
|
|
return new Long(low, high);
|
|
}
|
|
|
|
public function Long (low :int, high :int = 0)
|
|
{
|
|
this.low = low;
|
|
this.high = high;
|
|
}
|
|
|
|
// from Equalable
|
|
public function equals (other :Object) :Boolean
|
|
{
|
|
if (!(other is Long)) {
|
|
return false;
|
|
}
|
|
var that :Long = (other as Long);
|
|
return (this.high == that.high) && (this.low == that.low);
|
|
}
|
|
|
|
// from Wrapped
|
|
public function unwrap () :Object
|
|
{
|
|
return low; // TODO
|
|
}
|
|
}
|
|
}
|