459f12ded5
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4217 542714f4-19e9-0310-aa3c-eee0fc999fb1
33 lines
843 B
ActionScript
33 lines
843 B
ActionScript
package com.threerings.util {
|
|
|
|
/**
|
|
* Equivalent to java.lang.Integer.
|
|
*/
|
|
// Unfortunately, I think this is necessary.
|
|
// I was going to remove this class and just make the streaming stuff
|
|
// autotranslate between int <--> java.lang.Integer and
|
|
// Number <--> java.lang.Double. However, a Number object that refers
|
|
// to an integer value is actually an int. Yes, it's totally fucked.
|
|
public class Integer
|
|
implements Equalable
|
|
{
|
|
public var value :int;
|
|
|
|
public static function valueOf (val :int) :Integer
|
|
{
|
|
return new Integer(val);
|
|
}
|
|
|
|
public function Integer (value :int)
|
|
{
|
|
this.value = value;
|
|
}
|
|
|
|
// documentation inherited from interface Equalable
|
|
public function equals (other :Object) :Boolean
|
|
{
|
|
return (other is Integer) && (value === (other as Integer).value);
|
|
}
|
|
}
|
|
}
|