Class Question
- java.lang.Object
-
- edu.cnm.deepdive.interviewprep.model.Question
-
- All Implemented Interfaces:
Comparable<Question>
public class Question extends Object implements Comparable<Question>
Encapsulates aQuestion
object
-
-
Constructor Summary
Constructors Constructor Description Question()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
compareTo(Question other)
String
getAnswer()
Returns an answer in the form of a string.UUID
getId()
Returns a unique identifier for this instance.String
getQuestion()
Returns a question in the form of a string.String
getSource()
Returns a source in the form of a string.void
setAnswer(String answer)
Sets an answer in the form of a string.void
setId(UUID id)
Sets a unique identifier for this instance.void
setQuestion(String question)
Sets a question in the form of a string.void
setSource(String source)
Sets a source in the form of a string.
-
-
-
Method Detail
-
getId
public UUID getId()
Returns a unique identifier for this instance.
-
setId
public void setId(UUID id)
Sets a unique identifier for this instance.
-
getQuestion
public String getQuestion()
Returns a question in the form of a string.
-
setQuestion
public void setQuestion(String question)
Sets a question in the form of a string.
-
getAnswer
public String getAnswer()
Returns an answer in the form of a string.
-
setAnswer
public void setAnswer(String answer)
Sets an answer in the form of a string.
-
getSource
public String getSource()
Returns a source in the form of a string.
-
setSource
public void setSource(String source)
Sets a source in the form of a string.
-
compareTo
public int compareTo(Question other)
- Specified by:
compareTo
in interfaceComparable<Question>
-
-