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

package com.hypixel.hytale.codec.lookup;

import javax.annotation.Nullable;
import javax.annotation.Nonnull;

public class Priority
{
    @Nonnull
    public static Priority DEFAULT;
    @Nonnull
    public static Priority NORMAL;
    private int level;
    
    public Priority(final int level) {
        this.level = level;
    }
    
    public int getLevel() {
        return this.level;
    }
    
    @Nonnull
    public Priority before() {
        return this.before(1);
    }
    
    @Nonnull
    public Priority before(final int by) {
        return new Priority(this.level - by);
    }
    
    @Nonnull
    public Priority after() {
        return this.after(1);
    }
    
    @Nonnull
    public Priority after(final int by) {
        return new Priority(this.level - by);
    }
    
    @Override
    public boolean equals(@Nullable final Object o) {
        if (this == o) {
            return true;
        }
        if (o == null || this.getClass() != o.getClass()) {
            return false;
        }
        final Priority priority = (Priority)o;
        return this.level == priority.level;
    }
    
    @Override
    public int hashCode() {
        return this.level;
    }
    
    static {
        Priority.DEFAULT = new Priority(-1000);
        Priority.NORMAL = new Priority(0);
    }
}
