Package org.stellar.sdk.xdr
Class ClaimPredicate
java.lang.Object
org.stellar.sdk.xdr.ClaimPredicate
- All Implemented Interfaces:
XdrElement
ClaimPredicate's original definition in the XDR file is:
union ClaimPredicate switch (ClaimPredicateType type)
{
case CLAIM_PREDICATE_UNCONDITIONAL:
void;
case CLAIM_PREDICATE_AND:
ClaimPredicate andPredicates<2>;
case CLAIM_PREDICATE_OR:
ClaimPredicate orPredicates<2>;
case CLAIM_PREDICATE_NOT:
ClaimPredicate* notPredicate;
case CLAIM_PREDICATE_BEFORE_ABSOLUTE_TIME:
int64 absBefore; // Predicate will be true if closeTime < absBefore
case CLAIM_PREDICATE_BEFORE_RELATIVE_TIME:
int64 relBefore; // Seconds since closeTime of the ledger in which the
// ClaimableBalanceEntry was created
};
-
Nested Class Summary
Nested Classes -
Field Summary
Fields inherited from interface org.stellar.sdk.xdr.XdrElement
gson -
Constructor Summary
ConstructorsConstructorDescriptionClaimPredicate(ClaimPredicateType discriminant, ClaimPredicate[] andPredicates, ClaimPredicate[] orPredicates, ClaimPredicate notPredicate, Int64 absBefore, Int64 relBefore) Creates a newClaimPredicateinstance. -
Method Summary
Modifier and TypeMethodDescriptionbuilder()static ClaimPredicatedecode(XdrDataInputStream stream) static ClaimPredicatedecode(XdrDataInputStream stream, int maxDepth) voidencode(XdrDataOutputStream stream) Encodes this value to XDR and writes it to the provided stream.booleanstatic ClaimPredicatestatic ClaimPredicatefromXdrBase64(String xdr) static ClaimPredicatefromXdrByteArray(byte[] xdr) Value of theabsBeforefield.Value of theandPredicatesfield.Value of thediscriminantfield.Value of thenotPredicatefield.Value of theorPredicatesfield.Value of therelBeforefield.inthashCode()voidsetAbsBefore(Int64 absBefore) Value of theabsBeforefield.voidsetAndPredicates(ClaimPredicate[] andPredicates) Value of theandPredicatesfield.voidsetDiscriminant(ClaimPredicateType discriminant) Value of thediscriminantfield.voidsetNotPredicate(ClaimPredicate notPredicate) Value of thenotPredicatefield.voidsetOrPredicates(ClaimPredicate[] orPredicates) Value of theorPredicatesfield.voidsetRelBefore(Int64 relBefore) Value of therelBeforefield.toJson()Serializes this value to JSON.toString()Methods inherited from interface org.stellar.sdk.xdr.XdrElement
toXdrBase64, toXdrByteArray
-
Constructor Details
-
ClaimPredicate
public ClaimPredicate() -
ClaimPredicate
public ClaimPredicate(ClaimPredicateType discriminant, ClaimPredicate[] andPredicates, ClaimPredicate[] orPredicates, ClaimPredicate notPredicate, Int64 absBefore, Int64 relBefore) Creates a newClaimPredicateinstance.- Parameters:
discriminant- thediscriminantfield valueandPredicates- theandPredicatesfield valueorPredicates- theorPredicatesfield valuenotPredicate- thenotPredicatefield valueabsBefore- theabsBeforefield valuerelBefore- therelBeforefield value
-
-
Method Details
-
encode
Description copied from interface:XdrElementEncodes this value to XDR and writes it to the provided stream.- Specified by:
encodein interfaceXdrElement- Parameters:
stream- the destination XDR output stream- Throws:
IOException- if an I/O error occurs while writing the value
-
decode
- Throws:
IOException
-
decode
- Throws:
IOException
-
fromXdrBase64
- Throws:
IOException
-
fromXdrByteArray
- Throws:
IOException
-
toJson
Description copied from interface:XdrElementSerializes this value to JSON.- Specified by:
toJsonin interfaceXdrElement- Returns:
- the JSON representation of this value
-
fromJson
-
builder
-
toBuilder
-
getDiscriminant
Value of thediscriminantfield.- Returns:
- the
discriminantfield value
-
getAndPredicates
Value of theandPredicatesfield.- Returns:
- the
andPredicatesfield value
-
getOrPredicates
Value of theorPredicatesfield.- Returns:
- the
orPredicatesfield value
-
getNotPredicate
Value of thenotPredicatefield.- Returns:
- the
notPredicatefield value
-
getAbsBefore
Value of theabsBeforefield.- Returns:
- the
absBeforefield value
-
getRelBefore
Value of therelBeforefield.- Returns:
- the
relBeforefield value
-
setDiscriminant
Value of thediscriminantfield.- Parameters:
discriminant- thediscriminantfield value
-
setAndPredicates
Value of theandPredicatesfield.- Parameters:
andPredicates- theandPredicatesfield value
-
setOrPredicates
Value of theorPredicatesfield.- Parameters:
orPredicates- theorPredicatesfield value
-
setNotPredicate
Value of thenotPredicatefield.- Parameters:
notPredicate- thenotPredicatefield value
-
setAbsBefore
Value of theabsBeforefield.- Parameters:
absBefore- theabsBeforefield value
-
setRelBefore
Value of therelBeforefield.- Parameters:
relBefore- therelBeforefield value
-
equals
-
hashCode
public int hashCode() -
toString
-