You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Design how the Clear method should operate on a NonEmptyCollectionImpl class and implement any necessary changes. The current implementation throws an exception.
Document the method to clearly define the behaviour.
Value Proposition
Better defining the behaviour makes the class easier to use.
Design Ideas
There are a few options:
Throw an exception (as it does today) - it does not make sense to clear a non-empty collection
Fail silently - Just leave the collection as it is
Somehow transform the collection into an empty collection
The text was updated successfully, but these errors were encountered:
hectorjsmith
changed the title
Design clear behaviour for NonEmptyCollectionImpl
Better define behaviour of Clear() on NonEmptyCollectionImpl
Jun 12, 2020
Requirement
Clear
method should operate on aNonEmptyCollectionImpl
class and implement any necessary changes. The current implementation throws an exception.Value Proposition
Better defining the behaviour makes the class easier to use.
Design Ideas
There are a few options:
The text was updated successfully, but these errors were encountered: