Interface Variable

All Superinterfaces:
Comparable<Node>, Node, Serializable, TetradSerializable
All Known Implementing Classes:
AbstractVariable, ContinuousVariable, DiscreteVariable

public interface Variable extends Node
Interface implemented by classes, instantiations of which are capable of serving as variables for columns in a DataSet. Such a class provides needed details as to how the data in its column are to be interpreted. In particular, a variable has a name and specifies a value in the column that is to be interpreted as a missing datum. The variable also specifies how external data (in String form, say) is to be converted into raw data of the type used in the column in question.
Author:
josephramsey
  • Field Details

    • serialVersionUID

      static final long serialVersionUID
      Required serial version UID for serialization. Must be 23L.
      See Also:
  • Method Details

    • getMissingValueMarker

      Object getMissingValueMarker()
      Returns the name of the variable.
      Returns:
      the missing value marker as an object--i.e. a double if continuous, an Integer if discrete, etc.
    • isMissingValue

      boolean isMissingValue(Object value)
      Tests whether the given value is the missing data marker.
      Parameters:
      value - The object value one wants to check as a missing value.
      Returns:
      true iff the given object is equals to getMissingValueMarker().
    • checkValue

      boolean checkValue(Object value)
      Checks to see whether the passed value can be converted into a value for this variable.
      Parameters:
      value - The object value to be checked. For instance, for a continuous variable, this would be a Double, for a discrete variable, and Integer, etc.
      Returns:
      true iff the object is a valid value for this variable.