Class Bit32Lib

All Implemented Interfaces:
com.esotericsoftware.kryo.KryoSerializable

public class Bit32Lib extends TwoArgFunction
Subclass of LibFunction that implements the Lua standard bit32 library.

Typically, this library is included as part of a call to either

 
 Globals globals = JsePlatform.standardGlobals();
 System.out.println( globals.get("bit32").get("bnot").call( LuaValue.valueOf(2) ) );
  

To instantiate and use it directly, link it into your globals table via LuaValue.load(LuaValue) using code such as:

 
 Globals globals = new Globals();
 globals.load(new JseBaseLib());
 globals.load(new PackageLib());
 globals.load(new Bit32Lib());
 System.out.println( globals.get("bit32").get("bnot").call( LuaValue.valueOf(2) ) );
  

This has been implemented to match as closely as possible the behavior in the corresponding library in C.

See Also: