| Modifier and Type | Class and Description |
|---|---|
| public static record | FileAssociation.
Default implementation of |
| Modifier and Type | Method and Description |
|---|---|
| public Optional | Returns: file association descriptionReturns file association description if available or an empty |
| public String | |
| public default boolean | Returns: true if the file association has an iconReturns |
| public Optional | |
| public String |
| description | back to summary |
|---|---|
| public Optional Returns file association description if available or an empty | |
| extension | back to summary |
|---|---|
| public String extension() Returns file association extension. E.g.:
| |
| hasIcon | back to summary |
|---|---|
| public default boolean hasIcon() Returns
| |
| icon | back to summary |
|---|---|
| public Optional Returns file association icon if available or an empty | |
| mimeType | back to summary |
|---|---|
| public String mimeType() Returns file association MIME type. E.g.: file association MIME type
| |
FileAssociation interface
| Modifier and Type | Field and Description |
|---|---|
| private final Optional | description
Record Component accessed by description(). |
| private final String | extension
Record Component accessed by extension(). |
| private final Optional | |
| private final String | mimeType
Record Component accessed by mimeType(). |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public Optional | description()
Record Component getter of description. Implements jdk. Returns file association description if available or an empty
|
| public final boolean | equals(Object o)
Implements abstract java. Indicates whether some other object is "equal to" this one. |
| public String | extension()
Record Component getter of extension. Implements jdk. Returns file association extension.
|
| public final int | |
| public Optional | icon()
Record Component getter of icon. Implements jdk. Returns file association icon if available or an empty
|
| public String | mimeType()
Record Component getter of mimeType. Implements jdk. Returns file association MIME type.
|
| public final String | toString()
Implements abstract java. Returns a string representation of the record. |
| description | back to summary |
|---|---|
| private final Optional<String> description Record Component accessed by description(). | |
| extension | back to summary |
|---|---|
| private final String extension Record Component accessed by extension(). | |
| icon | back to summary |
|---|---|
| private final Optional<Path> icon Record Component accessed by icon(). | |
| mimeType | back to summary |
|---|---|
| private final String mimeType Record Component accessed by mimeType(). | |
| Stub | back to summary |
|---|---|
| public Stub(Optional<String> description, Optional<Path> icon, String mimeType, String extension) | |
| description | back to summary |
|---|---|
| public Optional Record Component getter of description. Implements jdk. Doc from jdk. Returns file association description if available or an empty | |
| equals | back to summary |
|---|---|
| public final boolean equals(Object o) Implements abstract java. Doc from java. Indicates whether some other object is "equal to" this one. In addition
to the general contract of
R copy = new R(r.c1(), r.c2(), ..., r.cn());
then it must be the case that r.equals(copy).
| |
| extension | back to summary |
|---|---|
| public String extension() Record Component getter of extension. Implements jdk. Doc from jdk. Returns file association extension. E.g.: | |
| hashCode | back to summary |
|---|---|
| public final int hashCode() Implements abstract java. Doc from java. Returns a hash code value for the record.
Obeys the general contract of | |
| icon | back to summary |
|---|---|
| public Optional Record Component getter of icon. Implements jdk. Doc from jdk. Returns file association icon if available or an empty | |
| mimeType | back to summary |
|---|---|
| public String mimeType() Record Component getter of mimeType. Implements jdk. Doc from jdk. Returns file association MIME type. E.g.: | |
| toString | back to summary |
|---|---|
| public final String toString() Implements abstract java. Doc from java. Returns a string representation of the record.
In accordance with the general contract of In addition to this general contract, record classes must further participate in the invariant that any two records which are equal must produce equal strings. This invariant is necessarily relaxed in the rare case where corresponding equal component values might fail to produce equal strings for themselves. | |