// 
// Decompiled by Procyon v0.6.0
// 

package com.nimbusds.jose;

import com.nimbusds.jose.util.JSONStringUtils;
import java.util.Objects;
import com.nimbusds.jose.shaded.jcip.Immutable;
import java.io.Serializable;

@Immutable
public final class CompressionAlgorithm implements Serializable
{
    private static final long serialVersionUID = 1L;
    public static final CompressionAlgorithm DEF;
    private final String name;
    
    public CompressionAlgorithm(final String name) {
        this.name = Objects.requireNonNull(name);
    }
    
    public String getName() {
        return this.name;
    }
    
    @Override
    public int hashCode() {
        return this.name.hashCode();
    }
    
    @Override
    public boolean equals(final Object object) {
        return object instanceof CompressionAlgorithm && this.toString().equals(object.toString());
    }
    
    @Override
    public String toString() {
        return this.name;
    }
    
    public String toJSONString() {
        return JSONStringUtils.toJSONString(this.name);
    }
    
    static {
        DEF = new CompressionAlgorithm("DEF");
    }
}
