@Override
	protected Scalar transform(ActivityContext context, Scalar scalar) throws ActivityException {
		if(!(scalar.get() instanceof Boolean)) {
			// TODO: implement the type mapper!!!!
			logger.error("arguments to logic operators must be boolean, while an instance of {} was received", scalar.get().getClass().getName());
			throw new InvalidArgumentException("Arguments to boolean operators must be boolean"); 
		}
		return new Scalar(!((Boolean)scalar.get()));
	}
@ Override protected Scalar transform ( ActivityContext context , Scalar scalar ) throws ActivityException { if ( ! ( scalar . get ( ) instanceof Boolean ) ) { logger . error ( "arguments to logic operators must be boolean, while an instance of {} was received" , scalar . get ( ) . getClass ( ) . getName ( ) ) ; throw new InvalidArgumentException ( "Arguments to boolean operators must be boolean" ) ; } return new Scalar ( ! ( ( Boolean ) scalar . get ( ) ) ) ; }
@see org.dihedron.patterns.activities.base.AbstractTransformation#transform(org.dihedron.patterns.activities.ActivityContext, org.dihedron.patterns.activities.types.Scalar)