Weakening the contract on Set.toArray(), to remove the non-modification guarantee from the
resulting array. Users requiring strong non-modification guarantees can manually do a deep or a shallow copy of the array, as appropriate for their task. git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4905 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
@@ -49,7 +49,9 @@ public interface Set
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns all elements in the set in an Array.
|
* Returns all elements in the set in an Array.
|
||||||
* Modifying the returned Array will not modify the set.
|
*
|
||||||
|
* <p>Note: this interface does not specify whether modifying the returned Array will modify
|
||||||
|
* the underlying set; the decision is up to implementation.
|
||||||
*/
|
*/
|
||||||
function toArray () :Array;
|
function toArray () :Array;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user