Skip to content

Exposing NTContaine>>tags: is not good #62

@Ducasse

Description

@Ducasse

NTContainer defines ensureTagNamed:.

NTContainer >> ensureTagNamed: aString
	"Add a tag if it not already present"
	^ self tags
		  detect: [ :n | n tagName = aString ]
		  ifNone: [ self addTagNamed: aString ]

It ensures that there is not two tags witht the same name.
Now the tags is an orderedCollection and not a Set.
So offering the tags: accessor means that the user could have duplicated tags.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions