MCPcopy Create free account
hub / github.com/beanshell/beanshell / intUnaryOperation

Method intUnaryOperation

src/bsh/Primitive.java:705–724  ·  view source on GitHub ↗
(Integer I, int kind)

Source from the content-addressed store, hash-verified

703 }
704
705 static int intUnaryOperation(Integer I, int kind)
706 {
707 int operand = I.intValue();
708
709 switch(kind)
710 {
711 case PLUS:
712 return operand;
713 case MINUS:
714 return -operand;
715 case TILDE:
716 return ~operand;
717 case INCR:
718 return operand + 1;
719 case DECR:
720 return operand - 1;
721 default:
722 throw new InterpreterError("bad integer unaryOperation");
723 }
724 }
725
726 static long longUnaryOperation(Long L, int kind)
727 {

Callers 2

unaryOperationMethod · 0.95

Calls 1

intValueMethod · 0.80

Tested by

no test coverage detected