> The question is whether the interface should change, and
> you're talking about how the underlying implementation behaves.

If the question is whether the interface should change, there ought to be
reasons.  So far, I have not seen any was my point.

> The reason to change the interface is that MX Records have an ordering,
> so the interface that returns a IP addresses based on MX records should
> return something that indicates that this is ordered.  Right now our
> interface does not indicate it is ordered.

I understand, and I am all for meaningful contracts.  My point is that a
Java Collection is not unordered.  It can be either ordered or unordered,
based upon the implementation class.

Java does not have an explicit Collection that uniquely says "I am ordered."
The List class is not the base of all ordered collection classes.  There are
other ordered collections.  List is the base of a particular type of ordered
collection classes, all of which share additional behaviors.  As per the
List javadoc:

 * An ordered collection (also known as a <i>sequence</i>).  The user of
this
 * interface has precise control over where in the list each element is
 * inserted.  The user can access elements by their integer index (position
in
 * the list), and search for elements in the list.<p>

The ListIterator also adds backwards traversal, list mutators, and index
operations.

None of these List behaviors are necessary parts of the client contract we
need to expose as far as I can see.  All that we require is that the
elements be ordered according to our application (RFC) defined scheme.  But
by changing the interface to a List, we preclude the ability to use any
other type of ordered collection.

I hope I am clearer now.

        --- Noel


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to