public class TLcyCompositeFileTypeDescriptor extends ALcyFileTypeDescriptor
ALcyFileTypeDescriptor
.
It keeps a list of associated ALcyFileTypeDescriptor
s. When it is asked if it includes a
filename, it loops over its associated ALcyFileTypeDescriptor
s to find a suitable
ALcyFileTypeDescriptor
.Constructor and Description |
---|
TLcyCompositeFileTypeDescriptor(String aDisplayName)
Creates a new TLcyCompositeFileTypeDescriptor with the given display name.
|
Modifier and Type | Method and Description |
---|---|
void |
addFileTypeDescriptor(ALcyFileTypeDescriptor aDescriptor)
Adds the given
ALcyFileTypeDescriptor to this composite descriptor. |
String |
getDefaultExtension()
Returns null.
|
String |
getDisplayName()
Returns the display name of this file type descriptor.
|
ALcyFileTypeDescriptor |
getFileTypeDescriptor(int aIndex)
Gets the
ALcyFileTypeDescriptor at the given position in the list. |
int |
getFileTypeDescriptorCount()
Gets the number of
ALcyFileTypeDescriptor s in this composite descriptor. |
boolean |
includes(String aFileName)
Returns true if the given filename is included in this file type descriptor.
|
void |
removeFileTypeDescriptor(ALcyFileTypeDescriptor aDescriptor)
Removes the given
ALcyFileTypeDescriptor from this composite descriptor. |
toString
public TLcyCompositeFileTypeDescriptor(String aDisplayName)
aDisplayName
- The display name for this descriptor.public void addFileTypeDescriptor(ALcyFileTypeDescriptor aDescriptor)
ALcyFileTypeDescriptor
to this composite descriptor.aDescriptor
- The descriptor to be added.removeFileTypeDescriptor(ALcyFileTypeDescriptor)
,
getFileTypeDescriptorCount()
,
getFileTypeDescriptor(int)
public void removeFileTypeDescriptor(ALcyFileTypeDescriptor aDescriptor)
ALcyFileTypeDescriptor
from this composite descriptor.aDescriptor
- The descriptor to be removed.addFileTypeDescriptor(ALcyFileTypeDescriptor)
public int getFileTypeDescriptorCount()
ALcyFileTypeDescriptor
s in this composite descriptor.ALcyFileTypeDescriptor
s in this composite descriptor.getFileTypeDescriptor(int)
public ALcyFileTypeDescriptor getFileTypeDescriptor(int aIndex)
ALcyFileTypeDescriptor
at the given position in the list.aIndex
- the index to retrieve the ALcyFileTypeDescriptor
for.ALcyFileTypeDescriptor
at the given position in the list.getFileTypeDescriptorCount()
public String getDisplayName()
ALcyFileTypeDescriptor
getDisplayName
in class ALcyFileTypeDescriptor
public boolean includes(String aFileName)
ALcyFileTypeDescriptor
includes
in class ALcyFileTypeDescriptor
aFileName
- The filename to test for validity.public String getDefaultExtension()
getDefaultExtension
in class ALcyFileTypeDescriptor