-
-
Save ShoaibKakal/897b0c55bb924538e93fb8644018d746 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.example.quizdapp.data; | |
import org.web3j.abi.datatypes.Bool; | |
import org.web3j.abi.datatypes.DynamicStruct; | |
import org.web3j.abi.datatypes.Utf8String; | |
public class Question extends DynamicStruct { | |
private String question; | |
private Boolean isTrue; | |
public Question(String question, Boolean isTrue) { | |
super(new Utf8String(question), new Bool(isTrue)); | |
this.question = question; | |
this.isTrue = isTrue; | |
} | |
public Question(Utf8String question, Bool isTrue) { | |
super(question, isTrue); | |
this.question = question.getValue(); | |
this.isTrue = isTrue.getValue(); | |
} | |
public String getQuestion() { | |
return question; | |
} | |
public void setQuestion(String question) { | |
this.question = question; | |
} | |
public Boolean getTrue() { | |
return isTrue; | |
} | |
public void setTrue(Boolean aTrue) { | |
isTrue = aTrue; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment