Added a setToken() that takes a boolean, as it can be very convenient.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3668 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
@@ -73,6 +73,18 @@ public class TokenRing extends SimpleStreamableObject
|
|||||||
return _tokens;
|
return _tokens;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set the specified token to be on or off.
|
||||||
|
*/
|
||||||
|
public void setToken (int token, boolean on)
|
||||||
|
{
|
||||||
|
if (on) {
|
||||||
|
setToken(token);
|
||||||
|
} else {
|
||||||
|
clearToken(token);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Adds the specified token to this ring.
|
* Adds the specified token to this ring.
|
||||||
*/
|
*/
|
||||||
|
|||||||
Reference in New Issue
Block a user