Class URef
- java.lang.Object
-
- com.syntifi.casper.sdk.model.uref.URef
-
public class URef extends java.lang.ObjectURef is a tuple that contains the address of the URef and the access rights to that URef. The serialized representation of the URef is 33 bytes long. The first 32 bytes are the byte representation of the URef address, and the last byte contains the bits corresponding to the access rights of the URef.- Since:
- 0.0.1
- See Also:
CLValueURef
-
-
Constructor Summary
Constructors Constructor Description URef()URef(byte[] address, URefAccessRight accessRight)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected booleancanEqual(java.lang.Object other)voidcreateURef(java.lang.String uref)booleanequals(java.lang.Object o)static UReffromString(java.lang.String uref)URefAccessRightgetAccessRight()byte[]getAddress()protected java.lang.StringgetJsonURef()inthashCode()voidsetAccessRight(URefAccessRight accessRight)voidsetAddress(byte[] address)java.lang.StringtoString()
-
-
-
Constructor Detail
-
URef
public URef(byte[] address, URefAccessRight accessRight)
-
URef
public URef()
-
-
Method Detail
-
fromString
public static URef fromString(java.lang.String uref) throws java.io.IOException, DynamicInstanceException, InvalidByteStringException
- Throws:
java.io.IOExceptionDynamicInstanceExceptionInvalidByteStringException
-
createURef
public void createURef(java.lang.String uref) throws java.io.IOException, DynamicInstanceException, InvalidByteStringException- Throws:
java.io.IOExceptionDynamicInstanceExceptionInvalidByteStringException
-
getJsonURef
@ExcludeFromJacocoGeneratedReport protected java.lang.String getJsonURef()
-
getAddress
public byte[] getAddress()
-
getAccessRight
public URefAccessRight getAccessRight()
-
setAddress
public void setAddress(byte[] address)
-
setAccessRight
public void setAccessRight(URefAccessRight accessRight)
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equalsin classjava.lang.Object
-
canEqual
protected boolean canEqual(java.lang.Object other)
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-