Class ContractId<T>

  • Type Parameters:
    T - A template type

    public class ContractId<T>
    extends java.lang.Object
    This class is used as a super class for all concrete ContractIds generated by the java codegen with the following properties:
     Foo.ContractId fooCid = new Foo.ContractId("test");
     Bar.ContractId barCid = new Bar.ContractId("test");
     ContractId<Foo> genericFooCid = new ContractId<>("test");
     ContractId<Foo> genericBarCid = new ContractId<>("test");
    
     fooCid.equals(genericFooCid) == true;
     genericFooCid.equals(fooCid) == true;
    
     fooCid.equals(barCid) == false;
     barCid.equals(fooCid) == false;
     
    Due to erase, we cannot distinguish ContractId<Foo> from ContractId<Bar>, thus:
     fooCid.equals(genericBarCid) == true
     genericBarCid.equals(fooCid) == true
    
     genericFooCid.equals(genericBarCid) == true
     genericBarCid.equals(genericFooCid) == true
     
    • Field Summary

      Fields 
      Modifier and Type Field Description
      java.lang.String contractId  
    • Constructor Summary

      Constructors 
      Constructor Description
      ContractId​(java.lang.String contractId)  
    • Field Detail

      • contractId

        public final java.lang.String contractId
    • Constructor Detail

      • ContractId

        public ContractId​(java.lang.String contractId)
    • Method Detail

      • toValue

        public final Value toValue()
      • equals

        public boolean equals​(java.lang.Object o)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object