PlatformFontDescription.java
2.37 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
/*
* Decompiled with CFR 0_118.
*
* Could not load the following classes:
* com.adobe.agl.util.ULocale
*/
package com.adobe.fontengine.fontmanagement.platform;
import com.adobe.agl.util.ULocale;
import com.adobe.fontengine.font.FontDescription;
import com.adobe.fontengine.fontmanagement.Platform;
public final class PlatformFontDescription
extends FontDescription {
static final long serialVersionUID = 1;
private final Platform platform;
private final ULocale locale;
private final String platformFamilyName;
public PlatformFontDescription(Platform platform, ULocale locale, String platformFamilyName) {
if (platform == null || locale == null || platformFamilyName == null) {
throw new NullPointerException("Platform, Locale, and Platform Name must not be null");
}
this.platform = platform;
this.locale = locale;
this.platformFamilyName = platformFamilyName;
}
public Platform getPlatform() {
return this.platform;
}
public ULocale getLocale() {
return this.locale;
}
public String getPlatformName() {
return this.platformFamilyName;
}
public int hashCode() {
int prime = 31;
int result = 1;
result = 31 * result + this.locale.hashCode();
result = 31 * result + this.platform.hashCode();
result = 31 * result + this.platformFamilyName.hashCode();
return result;
}
public boolean equals(Object obj) {
if (this == obj) {
return true;
}
if (obj == null) {
return false;
}
if (!(obj instanceof PlatformFontDescription)) {
return false;
}
PlatformFontDescription other = (PlatformFontDescription)obj;
if (this.locale == null ? other.locale != null : !this.locale.equals((Object)other.locale)) {
return false;
}
if (this.platform == null ? other.platform != null : !this.platform.equals(other.platform)) {
return false;
}
if (this.platformFamilyName == null ? other.platformFamilyName != null : !this.platformFamilyName.equals(other.platformFamilyName)) {
return false;
}
return true;
}
public String toString() {
return new String("[" + this.platform + ", " + (Object)this.locale + "] - " + this.platformFamilyName);
}
}