Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
Copyright (c) 2011 Michael Ruflin, Andr´┐Ż Locher, Claudia von Bastian. This file is part of Tatool. Tatool is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. Tatool is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with Tatool. If not, see <http://www.gnu.org/licenses/>. /
 
 package ch.tatool.core.data;
 
Helper Class with getter and setter methods for properties concerning trial questions and answers.

Author(s):
Michael Ruflin
 
 public class Question {

Property name used to set the question value.
 
 	public static final String PROPERTY_QUESTION = "question";

Property name used to set the answer value.
 
 	public static final String PROPERTY_ANSWER = "answer";

Property name used to set the response value.
 
 	public static final String PROPERTY_RESPONSE = "response";
 	
 	
 	private Question() {
 		// don't allow instantiation
 	}

Gets the questionProperty as a StringProperty.

Returns:
questionProperty
 
 	public static StringProperty getQuestionProperty() {
 		return ;
 	}

Gets the answerProperty, which represents the correct answer, as a ObjectProperty.

Returns:
answerProperty
 
 	public static ObjectProperty getAnswerProperty() {
 		return ;
 	}

Gets the responseProperty, which represents the given response of a user, as an ObjectProperty.

Returns:
responseProperty
 
 	public static ObjectProperty getResponseProperty() {
 		return ;
 	}

Sets the questionProperty as a StringProperty.

Parameters:
questionProperty the StringProperty that will be set
 
 	public static void setQuestionProperty(StringProperty questionProperty) {
 		. = questionProperty;
 	}

Sets the answerProperty, which represents the correct answer, as an ObjectProperty.

Parameters:
answerProperty the ObjectProperty that will be set
 
 	public static void setAnswerProperty(ObjectProperty answerProperty) {
 		. = answerProperty;
 	}

Sets the responseProperty, which represents the given response of a user, as an ObjectProperty.

Parameters:
responseProperty the ObjectProperty that will be set
 
 	public static void setResponseProperty(ObjectProperty responseProperty) {
 		. = responseProperty;
 	}

Helper Method to set the question and answer of a element trial.

Parameters:
node
question
answer
	public static void setQuestionAnswer(Node nodeString questionObject answer) {
		getQuestionProperty().setValue(nodequestion);
		getAnswerProperty().setValue(nodeanswer);
	}

Helper Method to set the answer of a element trial.

Parameters:
node
answer
	public static void setAnswer(Node nodeObject answer) {
		getAnswerProperty().setValue(nodeanswer);
	}
New to GrepCode? Check out our FAQ X