cmu.survey.objects
Class AnswerGendered

java.lang.Object
  extended by cmu.survey.objects.AnswerGendered
All Implemented Interfaces:
Answer

public class AnswerGendered
extends java.lang.Object
implements Answer


Field Summary
static java.lang.String[] FILTER_TYPES
           
static java.lang.String HE_SHE
           
static java.lang.String[] HE_SHE_FILTERED
           
static java.lang.String HIM_HER
           
static java.lang.String[] HIM_HER_FILTERED
           
static java.lang.String HIS_HER
           
static java.lang.String[] HIS_HER_FILTERED
           
static java.lang.String HIS_HERS
           
static java.lang.String[] HIS_HERS_FILTERED
           
static java.lang.String MALE_FEMALE
           
static java.lang.String[] MALE_FEMALE_FILTERED
           
 
Constructor Summary
AnswerGendered(Answer otherAnswer, java.lang.String newTypeOfFilter)
           
 
Method Summary
 java.lang.String filter(boolean male)
           
 java.lang.String getDefaultValue()
           
 java.lang.String getDescriptor()
          The descriptor is the label that should be used as a reference.
 java.lang.String getFieldName()
           
 java.lang.String getType()
           
 java.lang.String getValue()
           
 boolean isTypeKey()
           
 boolean isTypeNumeric()
           
 boolean isTypeString()
           
 void setDefaultValue(java.lang.String defaultValueToSet)
           
 boolean setType(java.lang.String newType)
           
 void setTypeOfFilter(java.lang.String newTypeOfFilter)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

HE_SHE

public static java.lang.String HE_SHE

HIS_HERS

public static java.lang.String HIS_HERS

HIS_HER

public static java.lang.String HIS_HER

HIM_HER

public static java.lang.String HIM_HER

MALE_FEMALE

public static java.lang.String MALE_FEMALE

FILTER_TYPES

public static java.lang.String[] FILTER_TYPES

HE_SHE_FILTERED

public static java.lang.String[] HE_SHE_FILTERED

HIS_HERS_FILTERED

public static java.lang.String[] HIS_HERS_FILTERED

HIS_HER_FILTERED

public static java.lang.String[] HIS_HER_FILTERED

HIM_HER_FILTERED

public static java.lang.String[] HIM_HER_FILTERED

MALE_FEMALE_FILTERED

public static java.lang.String[] MALE_FEMALE_FILTERED
Constructor Detail

AnswerGendered

public AnswerGendered(Answer otherAnswer,
                      java.lang.String newTypeOfFilter)
Method Detail

getValue

public java.lang.String getValue()
Specified by:
getValue in interface Answer

setTypeOfFilter

public void setTypeOfFilter(java.lang.String newTypeOfFilter)

filter

public java.lang.String filter(boolean male)

isTypeNumeric

public boolean isTypeNumeric()
Specified by:
isTypeNumeric in interface Answer

isTypeString

public boolean isTypeString()
Specified by:
isTypeString in interface Answer

isTypeKey

public boolean isTypeKey()
Specified by:
isTypeKey in interface Answer

getDefaultValue

public java.lang.String getDefaultValue()
Specified by:
getDefaultValue in interface Answer

setDefaultValue

public void setDefaultValue(java.lang.String defaultValueToSet)
Specified by:
setDefaultValue in interface Answer

setType

public boolean setType(java.lang.String newType)
Specified by:
setType in interface Answer
Returns:
success or not (false means a failure)

getType

public java.lang.String getType()
Specified by:
getType in interface Answer

getDescriptor

public java.lang.String getDescriptor()
Description copied from interface: Answer
The descriptor is the label that should be used as a reference. Then, the storage class will be able to retrieve a copy of the answer from it.

Specified by:
getDescriptor in interface Answer
Returns:

getFieldName

public java.lang.String getFieldName()
Specified by:
getFieldName in interface Answer
Returns: