All Downloads are FREE. Search and download functionalities are using the official Maven repository.

su.iroha.0.0.8.source-code.Hash Maven / Gradle / Ivy

Go to download

A application used as an example on how to set up pushing its components to the Central Repository.

The newest version!
/* ----------------------------------------------------------------------------
 * This file was automatically generated by SWIG (http://www.swig.org).
 * Version 3.0.12
 *
 * Do not make changes to this file unless you know what you are doing--modify
 * the SWIG interface file instead.
 * ----------------------------------------------------------------------------- */


public class Hash extends Blob {
  private transient long swigCPtr;

  protected Hash(long cPtr, boolean cMemoryOwn) {
    super(irohaJNI.Hash_SWIGUpcast(cPtr), cMemoryOwn);
    swigCPtr = cPtr;
  }

  protected static long getCPtr(Hash obj) {
    return (obj == null) ? 0 : obj.swigCPtr;
  }

  protected void finalize() {
    delete();
  }

  public synchronized void delete() {
    if (swigCPtr != 0) {
      if (swigCMemOwn) {
        swigCMemOwn = false;
        irohaJNI.delete_Hash(swigCPtr);
      }
      swigCPtr = 0;
    }
    super.delete();
  }

  static public class Hasher {
    private transient long swigCPtr;
    protected transient boolean swigCMemOwn;
  
    protected Hasher(long cPtr, boolean cMemoryOwn) {
      swigCMemOwn = cMemoryOwn;
      swigCPtr = cPtr;
    }
  
    protected static long getCPtr(Hasher obj) {
      return (obj == null) ? 0 : obj.swigCPtr;
    }
  
    protected void finalize() {
      delete();
    }
  
    public synchronized void delete() {
      if (swigCPtr != 0) {
        if (swigCMemOwn) {
          swigCMemOwn = false;
          irohaJNI.delete_Hash_Hasher(swigCPtr);
        }
        swigCPtr = 0;
      }
    }
  
    public long hash_invoke(Hash h) {
      return irohaJNI.Hash_Hasher_hash_invoke(swigCPtr, this, Hash.getCPtr(h), h);
    }
  
    public Hasher() {
      this(irohaJNI.new_Hash_Hasher(), true);
    }
  
  }

  public Hash() {
    this(irohaJNI.new_Hash__SWIG_0(), true);
  }

  public Hash(String hash) {
    this(irohaJNI.new_Hash__SWIG_1(hash), true);
  }

  public String toString() {
    return irohaJNI.Hash_toString(swigCPtr, this);
  }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy