
lowentry.ue4.classes.ParsedHashcash Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of java Show documentation
Show all versions of java Show documentation
A Java library for the Low Entry UE4 plugins.
package lowentry.ue4.classes;
import java.util.Date;
public class ParsedHashcash
{
protected final boolean valid;
protected final String resource;
protected final Date date;
protected final int bits;
public ParsedHashcash(boolean valid, String resource, Date date, int bits)
{
this.valid = valid;
this.resource = resource;
this.date = date;
this.bits = bits;
}
/**
* Returns true if this HashCash is valid, returns false if it is not valid.
*/
public boolean isValid()
{
return valid;
}
/**
* Returns the resource (basically the service ID) of this HashCash.
*/
public String getResource()
{
return resource;
}
/**
* Returns the creation date of this HashCash.
*/
public Date getDate()
{
return date;
}
/**
* Returns the bits (the strength, the value) of this HashCash.
*/
public int getBits()
{
return bits;
}
@Override
public String toString()
{
if(!valid)
{
return getClass().getSimpleName() + "{invalid}";
}
return getClass().getSimpleName() + "{resource=\"" + resource + "\", date=\"" + date + "\", bits=" + bits + "}";
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy