Provides mutable access to a value. Mutable is used as a generic interface to the implementations in this package. A typical use case would be to enable a primitive or string to be passed to a method and allow that method to effectively change the value of the primitive/string.
| 30 | * @since 2.1 |
| 31 | */ |
| 32 | public interface Mutable<T> { |
| 33 | |
| 34 | /** |
| 35 | * Gets the value of this mutable. |
| 36 | * |
| 37 | * @return the stored value |
| 38 | */ |
| 39 | T getValue(); |
| 40 | |
| 41 | /** |
| 42 | * Sets the value of this mutable. |
| 43 | * |
| 44 | * @param value |
| 45 | * the value to store |
| 46 | * @throws NullPointerException |
| 47 | * if the object is null and null is invalid |
| 48 | * @throws ClassCastException |
| 49 | * if the type is invalid |
| 50 | */ |
| 51 | void setValue(T value); |
| 52 | |
| 53 | } |
no outgoing calls
no test coverage detected