package mapped;

import net.runelite.mapping.ObfuscatedName;
import net.runelite.mapping.ObfuscatedSignature;
import net.runelite.rs.api.RSNode;

@ObfuscatedName("sh")
public class Node implements RSNode {
   @ObfuscatedName("hp")
   public long key;
   @ObfuscatedName("hl")
   @ObfuscatedSignature(
      descriptor = "Lsh;"
   )
   public Node previous;
   @ObfuscatedName("hq")
   @ObfuscatedSignature(
      descriptor = "Lsh;"
   )
   public Node next;

   @ObfuscatedName("fz")
   public void remove_base() {
      this.rl$unlink();
      if(this.next != null) {
         this.next.previous = this.previous;
         this.previous.next = this.next;
         this.previous = null;
         this.next = null;
      }
   }

   @ObfuscatedName("fx")
   public boolean hasNext_base() {
      return this.next != null;
   }

   public long getHash() {
      return this.key;
   }

   public void onUnlink() {
   }

   public void rl$unlink() {
      this.onUnlink();
   }

   public RSNode getNext() {
      return this.previous;
   }

   public void setNext(RSNode var1) {
      this.previous = (Node)var1;
   }

   public RSNode getPrevious() {
      return this.next;
   }

   public void setPrevious(RSNode var1) {
      this.next = (Node)var1;
   }

   public void unlink() {
      this.remove_base();
   }
}
