public static final class FileChooser.ExtensionFilter
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
private java.lang.String |
description |
private java.util.List<java.lang.String> |
extensions |
| Constructor and Description |
|---|
ExtensionFilter(java.lang.String description,
java.util.List<java.lang.String> extensions)
Creates an
ExtensionFilter with the specified description
and the file name extensions. |
ExtensionFilter(java.lang.String description,
java.lang.String... extensions)
Creates an
ExtensionFilter with the specified description
and the file name extensions. |
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
getDescription()
Gets the description for this
ExtensionFilter. |
java.util.List<java.lang.String> |
getExtensions()
Gets the file name extensions for this
ExtensionFilter. |
private static void |
validateArgs(java.lang.String description,
java.lang.String[] extensions) |
private final java.lang.String description
private final java.util.List<java.lang.String> extensions
public ExtensionFilter(java.lang.String description,
java.lang.String... extensions)
ExtensionFilter with the specified description
and the file name extensions.
File name extension should be specified in the *.<extension>
format.
description - the textual description for the filterextensions - the accepted file name extensionsjava.lang.NullPointerException - if the description or the extensions
are nulljava.lang.IllegalArgumentException - if the description or the extensions
are emptypublic ExtensionFilter(java.lang.String description,
java.util.List<java.lang.String> extensions)
ExtensionFilter with the specified description
and the file name extensions.
File name extension should be specified in the *.<extension>
format.
description - the textual description for the filterextensions - the accepted file name extensionsjava.lang.NullPointerException - if the description or the extensions
are nulljava.lang.IllegalArgumentException - if the description or the extensions
are emptypublic java.lang.String getDescription()
ExtensionFilter.public java.util.List<java.lang.String> getExtensions()
ExtensionFilter.
The returned list is unmodifiable and will throw
UnsupportedOperationException on each modification attempt.
private static void validateArgs(java.lang.String description,
java.lang.String[] extensions)