org.specrunner.source.text
Class Feature

java.lang.Object
  extended by org.specrunner.source.text.NamedSentences
      extended by org.specrunner.source.text.Feature
All Implemented Interfaces:
IValidable

public class Feature
extends NamedSentences

Stand for a feature object.

Author:
Thiago Santos

Field Summary
 
Fields inherited from class org.specrunner.source.text.NamedSentences
name, sentences
 
Constructor Summary
Feature(String name)
          Default constructor.
 
Method Summary
 Feature add(Scenario scenario)
          Add a scenario to the feature.
 Feature addBackground(Sentence background)
          Add a background sentence.
 Feature addFinallys(Sentence finallys)
          Add an ending sentence.
 List<Sentence> getBackground()
          The background list.
 List<Sentence> getFinallys()
          The ending list.
 Keywords getKeywords()
          Get the keywords used.
 List<Scenario> getScenarios()
          Get the scenario list.
 void setBackground(List<Sentence> background)
          Set the background list.
 void setFinallys(List<Sentence> finallys)
          Set the ending list.
 void setKeywords(Keywords keywords)
          Set the keywords used.
 void setScenarios(List<Scenario> scenarios)
          The scenario list.
 String validate()
          Validate a feature set.
 
Methods inherited from class org.specrunner.source.text.NamedSentences
addSentence, getName, getSentences, setName, setSentences
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Feature

public Feature(String name)
Default constructor.

Parameters:
name - The name.
Method Detail

getKeywords

public Keywords getKeywords()
Get the keywords used.

Returns:
The keywords.

setKeywords

public void setKeywords(Keywords keywords)
Set the keywords used.

Parameters:
keywords - The keywords.

getBackground

public List<Sentence> getBackground()
The background list.

Returns:
The list.

setBackground

public void setBackground(List<Sentence> background)
Set the background list.

Parameters:
background - The list.

addBackground

public Feature addBackground(Sentence background)
Add a background sentence.

Parameters:
background - A sentence.
Returns:
The feature itself.

getFinallys

public List<Sentence> getFinallys()
The ending list.

Returns:
The list.

setFinallys

public void setFinallys(List<Sentence> finallys)
Set the ending list.

Parameters:
finallys - The list.

addFinallys

public Feature addFinallys(Sentence finallys)
Add an ending sentence.

Parameters:
finallys - A sentence.
Returns:
The feature itself.

getScenarios

public List<Scenario> getScenarios()
Get the scenario list.

Returns:
The list.

setScenarios

public void setScenarios(List<Scenario> scenarios)
The scenario list.

Parameters:
scenarios - The list.

add

public Feature add(Scenario scenario)
Add a scenario to the feature.

Parameters:
scenario - The scenario.
Returns:
The feature itself.

validate

public String validate()
Validate a feature set.

Returns:
The error message, or null, if no error is found.


Copyright © 2015. All rights reserved.