Class CustomizableSpeed

java.lang.Object
net.okapia.osid.primordium.mapping.CustomizableSpeed
All Implemented Interfaces:
Serializable, Comparable<Speed>, OsidPrimitive, Speed, Speed, OsidPrimitive

public class CustomizableSpeed extends Object implements Speed
A Speed that wraps another speed and forwards every method to it, so it carries exactly the wrapped value and the same identity: it is equal to the speed it wraps and to any other speed of the same value. The single seam is toString(); every other method is final, so a subclass cannot reach anything the contract depends on. Customize the string form by passing a CustomizableSpeed.Codec to speed(org.osid.mapping.Speed, Codec), or by subclassing and overriding toString().

See CustomizableDistance for the full design rationale (value-based identity, the toString() seam, and the bundling pattern). Intentionally not final.

See Also: