public ScriptBuilder number ( int index , long num ) { if ( num == - 1 ) { return op ( index , OP_1NEGATE ) ; } else if ( num >= 0 && num <= 16 ) { return smallNum ( index , ( int ) num ) ; } else { return bigNum ( index , num ) ; } }
Adds the given number to the given index in the program . Automatically uses shortest encoding possible .