Platform.java 993 Bytes
/*
 * Decompiled with CFR 0_118.
 */
package com.adobe.fontengine.fontmanagement;

import java.io.Serializable;

public final class Platform
implements Serializable {
    public static final Platform UNKNOWN = new Platform("Unknown");
    public static final Platform MAC_OSX = new Platform("Mac OS X");
    public static final Platform WINDOWS = new Platform("Windows");
    private static final Platform[] platforms = new Platform[]{MAC_OSX, WINDOWS};
    static final long serialVersionUID = 1;
    private String name;

    private Platform(String name) {
        this.name = name;
    }

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

    private Object readResolve() {
        return Platform.parse(this.name);
    }

    public static Platform parse(String text) {
        for (int i = 0; i < platforms.length; ++i) {
            if (!Platform.platforms[i].name.equalsIgnoreCase(text)) continue;
            return platforms[i];
        }
        return null;
    }
}