Sets a new value represented with a logical value.
true if the value was successfully set; otherwise, the method returns false.