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()
VersionedAttachmentsListasList in interface VersionedAttachmentsListList of Attachment.public boolean isLatestVersion(Attachment attachment)
isLatestVersion in interface VersionedAttachmentsListattachment - The attachment in play. Should not be null.Copyright © 2002-2019 Atlassian. All Rights Reserved.