public class FileNameBasedVersionedAttachmentsList extends Object implements VersionedAttachmentsList
It stores this 'version' information when constructed by building up a Map
with keys for every
distinct file name in the underlying List
of attachments. Then, each key's value is a
TreeSet
of attachments which have that filename.
Constructor and Description |
---|
FileNameBasedVersionedAttachmentsList(List<Attachment> attachments) |
Modifier and Type | Method and Description |
---|---|
List<Attachment> |
asList()
Returns the underlying list of attachments.
|
boolean |
isLatestVersion(Attachment attachment)
Determines whether the specified attachment is the latest file uploaded amongst the group of files
with the same name in the underlying list.
|
public FileNameBasedVersionedAttachmentsList(List<Attachment> attachments)
public List<Attachment> asList()
VersionedAttachmentsList
asList
in interface VersionedAttachmentsList
List
of Attachment
.public boolean isLatestVersion(Attachment attachment)
isLatestVersion
in interface VersionedAttachmentsList
attachment
- The attachment in play. Should not be null.Copyright © 2002-2022 Atlassian. All Rights Reserved.