Skip to end of metadata
Go to start of metadata

Interfaces defined as (error) READ-WRITE on the HONOUR SYSTEM

Don't Do this

This technique involves trust .. what are you trusting your implementor and client code to do? Best read the javadocs ... The examples will show different ways to write your javadocs to limit the damage.

Story: Setting up a style before calling render

Create

 

not required

Read

(tick)

Recommend readers copy on use

Write

(tick)

 

Thread-safe

(error)

Simply not safe

Mixed Implementations

 

not required

The GeoAPI filter package is open to this problem (something that is being fixed over time).

Example Interface

The example is, unfortunately, exactly what you would expect - we add setters to the interface.

Notes:

  • Citation.getDates() now directly reflects the contents, you can call add, remove and so on as needed.

Example Implementations

Default Implementation

This first implementation is done straight up, minimal implementation of the interface. We were forced to assume a specific collection implementation (ie HashSet) below.

Example use:

Labels
  • None