Cog supports converting directly to and from implementations of java.util.List, and with com.partnersoft.data.Naming. It also supports conversion to and from other types of Java object via the Coggable interface.
An implementation of Coggable must:
The constructor should treat the input cog as the desired state of the new object. The toCog() method must return the state of the existing object.
Coggable uses a constructor to set state, rather than a fromCog() or similar method. This allows the implementation of Immutable cogs, that have their entire state set at construction time and then cannot be modified.