public static MutableShort fromExternal ( final Supplier < Short > s , final Consumer < Short > c ) { return new MutableShort ( ) { @ Override public short getAsShort ( ) { return s . get ( ) ; } @ Override public Short get ( ) { return getAsShort ( ) ; } @ Override public MutableShort set ( final short value ) { c . accept ( value ) ; return this ; } } ; }
Construct a MutableShort that gets and sets an external value using the provided Supplier and Consumer