FontProxy.java 1.14 KB
/*
 * Decompiled with CFR 0_118.
 */
package com.adobe.fontengine.fontmanagement;

import com.adobe.fontengine.font.Font;
import com.adobe.fontengine.font.FontDescription;
import java.io.Serializable;

public final class FontProxy
implements Serializable {
    static final long serialVersionUID = 1;
    FontDescription fontDesc;
    Font font;

    public FontProxy(FontDescription fontDesc, Font font) {
        this.fontDesc = fontDesc;
        this.font = font;
    }

    public Font getFont() {
        return this.font;
    }

    public FontDescription getFontDescription() {
        return this.fontDesc;
    }

    public boolean equals(Object obj) {
        if (obj != null) {
            if (this == obj) {
                return true;
            }
            if (obj instanceof FontProxy && this.fontDesc.equals(((FontProxy)obj).fontDesc) && this.font.equals(((FontProxy)obj).font)) {
                return true;
            }
        }
        return false;
    }

    public int hashCode() {
        return this.font.hashCode() ^ this.fontDesc.hashCode();
    }

    public String toString() {
        return this.fontDesc.toString();
    }
}