Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.sun.interview
Class NullQuestion

    java.lang.Object
      com.sun.interview.Question
          com.sun.interview.NullQuestion

Direct Known Subclasses:
  ErrorQuestion, FinalQuestion

    public abstract class NullQuestion

extends Question

A "null" question with no response. In effect, this posts the text, which must simply be acknowledged.

Field Summary
`static int` | `LEVEL_1`
`static int` | `LEVEL_2`
`static int` | `LEVEL_3`
`static int` | `LEVEL_LEGACY`
`static int` | `LEVEL_NONE`

Fields inherited from class com.sun.interview.Question
`interview, key, tag`

Constructor Summary
`protected` | `NullQuestion(Interview interview)` Create a null question.
`protected` | `NullQuestion(Interview interview, java.lang.String tag)` Create a question with a nominated tag.
`protected` | `NullQuestion(Interview interview, java.lang.String tag, int level)` Create a question with a nominated tag.

Method Summary
`void` | `clear()` Clear any response to this question, resetting the value back to its initial state.
`int` | `getLevel()` Get the current heading level.
`java.lang.String` | `getStringValue()` A NullQuestion does not have a value, and so this method always returns null.
`boolean` | `isValueAlwaysValid()` A NullQuestion does not have a value, and so this method always returns true.
`boolean` | `isValueValid()` A NullQuestion does not have a value, and so this method always returns true.
`protected void` | `load(java.util.Map data)` Load the value for this question from a dictionary, using the tag as the key.
`protected void` | `save(java.util.Map data)` Save the value for this question in a dictionary, using the tag as the key.
`void` | `setLevel(int val)` Set the heading level of this question.
`void` | `setValue(java.lang.String ignore)` Set the response to this question to the value represented by a string-valued argument.

Methods inherited from class com.sun.interview.Question
`addMarker, equals, export, getChecklistItems, getHelpID, getImage, getInterview, getKey, getNext, getResourceString, getResourceString, getSummary, getTag, getText, getTextArgs, hashCode, hasMarker, isEnabled, isHidden, reload, removeMarker, setImage, setImage, setSummary, setText`

Methods inherited from class java.lang.Object
`clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### LEVEL_NONE

    public static final int LEVEL_NONE

See Also:
  Constant Field Values

### LEVEL_LEGACY

    public static final int LEVEL_LEGACY

See Also:
  Constant Field Values

### LEVEL_1

    public static final int LEVEL_1

See Also:
  Constant Field Values

### LEVEL_2

    public static final int LEVEL_2

See Also:
  Constant Field Values

### LEVEL_3

    public static final int LEVEL_3

See Also:
  Constant Field Values

Constructor Detail

### NullQuestion

    protected NullQuestion(Interview interview)

  Create a null question.

  Parameters:
    `interview` - The interview containing this question.

### NullQuestion

    protected NullQuestion(Interview interview,
                           java.lang.String tag)

  Create a question with a nominated tag.

  Parameters:
    `interview` - The interview containing this question.
    `tag` - A unique tag to identify this specific question.

### NullQuestion

    protected NullQuestion(Interview interview,
                           java.lang.String tag,
                           int level)

  Create a question with a nominated tag.

  Parameters:
    `interview` - The interview containing this question.
    `tag` - A unique tag to identify this specific question.
    `level` - The "level" of this question.

Method Detail

### setLevel

    public void setLevel(int val)

  Set the heading level of this question. This is roughly equivalent to heading levels in HTML, where heading 1 is the largest, for a document title or chapter. As the number grows, the heading is semantically finer grained. For compatibility purposes a question has heading level zero by default, this is the JT Harness 3.x style of rendering. Level 1 is the strongest heading level in JT Harness 4.x and later. A "none" heading level is also available, meaning that a null question is requested, but has no more semantic importance than any other question.

  Parameters:
    `val` - One of the level constants defined in this class.
  Throws:
    `java.lang.IllegalArgumentException` - If the parameter is out of range.
  Since:
    4.0
  See Also:
    `LEVEL_NONE`, `LEVEL_1`, `LEVEL_2`, `LEVEL_3`

### getLevel

    public int getLevel()

  Get the current heading level.

  Returns:
    The heading level, as defined by one of this class' constants.

### clear

    public void clear()

  Clear any response to this question, resetting the value back to its initial state. Since this question has no response, there is no value, and so no action is performed.

  Specified by:
    `clear` in class `Question`

### getStringValue

    public java.lang.String getStringValue()

  A NullQuestion does not have a value, and so this method always returns null.

  Specified by:
    `getStringValue` in class `Question`
  Returns:
    null
  See Also:
    `Question.setValue(String)`

### setValue

    public void setValue(java.lang.String ignore)

  Set the response to this question to the value represented by a string-valued argument. For this question, no value is appropriate and an exception is always thrown.

  Specified by:
    `setValue` in class `Question`
  Parameters:
    `ignore` - A string containing a value value appropriate for the particular type of question whose value is being set.
  Throws:
    `java.lang.UnsupportedOperationException` - always
  See Also:
    `Question.getStringValue()`

### isValueValid

    public boolean isValueValid()

  A NullQuestion does not have a value, and so this method always returns true.

  Specified by:
    `isValueValid` in class `Question`
  Returns:
    true

### isValueAlwaysValid

    public boolean isValueAlwaysValid()

  A NullQuestion does not have a value, and so this method always returns true.

  Specified by:
    `isValueAlwaysValid` in class `Question`
  Returns:
    true

### load

    protected void load(java.util.Map data)

  Load the value for this question from a dictionary, using the tag as the key.

  Specified by:
    `load` in class `Question`
  Parameters:
    `data` - ignored

### save

    protected void save(java.util.Map data)

  Save the value for this question in a dictionary, using the tag as the key. Since there is no value, this method is a no-op.

  Specified by:
    `save` in class `Question`
  Parameters:
    `data` - ignored

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright (c) 1996, 2010, Oracle and/or its affiliates. All rights reserved.