Class CustomizableCoordinate

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

public class CustomizableCoordinate extends Object implements Coordinate
A Coordinate that wraps another coordinate and forwards every method to it, so it carries exactly the wrapped value and the same identity: it is equal to the coordinate it wraps and to any other coordinate 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 CustomizableCoordinate.Codec to coordinate(org.osid.mapping.Coordinate, 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: