MMBase

MMCI bridge interfaces and java 1.5 generics.

Details

  • Type: Task Task
  • Status: Resolved Resolved
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: 1.9.0
  • Fix Version/s: 1.9.0
  • Component/s: Core
  • Description:
    Hide
    We changed the following:

    NodeList now is a 'resolved' generic:

    public interface NodeList extends BridgeList<Node> {

    in stead of what it was:

    public interface NodeList<E extends Node> extends BridgeList<E> {

    Cons of this change are:
    - Lists which used to be extenions of NodeList, are not any more so:
      for instance RelationList does _not_ extend NodeList. This is a backwards compatiblity issue.
      
    Pros are:
    - NodeList being a generic NodeList<Node> is silly. Remaining to use 'NodeList' is acceptable though, but automatic code refactoring, may cause expllit 'NodeList<Node>', which is avoided if NodeList has resolved generics.

    Anyhow Nodelist is basicly discouraged in HEAD. You can use List<Node>, or if you need properties on the list, BridgeList<Node>. Since it still is valid that Node extends Relation, a RelationList _is_ a List<Node>.

    In my humble personal opinion this makes all bridge-list interfaces a bit irrelevant and I don't really care whether the original 'pierre' (NodeList<E extends Node>) or the current 'nico' version (NodeList extends BridgeList<Node>) is chosen.

    Show
    We changed the following: NodeList now is a 'resolved' generic: public interface NodeList extends BridgeList<Node> { in stead of what it was: public interface NodeList<E extends Node> extends BridgeList<E> { Cons of this change are: - Lists which used to be extenions of NodeList, are not any more so:   for instance RelationList does _not_ extend NodeList. This is a backwards compatiblity issue.    Pros are: - NodeList being a generic NodeList<Node> is silly. Remaining to use 'NodeList' is acceptable though, but automatic code refactoring, may cause expllit 'NodeList<Node>', which is avoided if NodeList has resolved generics. Anyhow Nodelist is basicly discouraged in HEAD. You can use List<Node>, or if you need properties on the list, BridgeList<Node>. Since it still is valid that Node extends Relation, a RelationList _is_ a List<Node>. In my humble personal opinion this makes all bridge-list interfaces a bit irrelevant and I don't really care whether the original 'pierre' (NodeList<E extends Node>) or the current 'nico' version (NodeList extends BridgeList<Node>) is chosen.

Issue Links

Activity

People

Dates

  • Created:
    2007-03-01 13:20
    Updated:
    2007-05-04 14:16
    Resolved:
    2007-05-04 14:16