Main Page | Class Hierarchy | Class List | Class Members

kddml.Core.Scalar.RangeType Class Reference

Inheritance diagram for kddml.Core.Scalar.RangeType:

kddml.Core.Scalar.KDDMLScalarType kddml.Core.Scalar.IntegerRangeType kddml.Core.Scalar.RealRangeType List of all members.

Public Member Functions

 RangeType (Class<?> class1, boolean is_min_included, boolean is_max_included)
Class getElementClass ()
Object convertValue (String value)
abstract boolean checkValue (String value)

Detailed Description

A class to represent ranges of values. A range is defined to contain all the values between the minimum and maximum values, where the minimum/maximum value can be considered either included or excluded from the range. This example creates a range of Integers whose minimum value is 1 and the maximum value is 5. The range is inclusive at both ends:
Range intRange = new Range(Integer.class, new Integer(1), new Integer(5));
A Range can be unbounded at either or both of its ends. An unbounded end is specified by passing null for the value of that end. A Range unbounded at both of its ends represents a range of all possible values for the Class of elements in that Range. The isMinIncluded() method will always return true for a Range unbounded on the minimum side and correspondingly the isMaxIncluded() method will always return true for a Range unbounded on the maximum side. An empty range is defined as a Range whose minimum value is greater than it's maximum value if the ends are included, or as a Range whose minimum value is greater than or equal to it's maximum value, if the minimum or the maximum value is excluded.

Title: KDDML

Description: Knowledge Discovery in Database Environment

Copyright: Copyright (c) 2003 - 2005

Company: Universita' di Pisa - Dipartimento di Informatica

Author:
Andrea Romei (romei@di.unipi.it)
Version:
2.0.16


Constructor & Destructor Documentation

kddml.Core.Scalar.RangeType.RangeType Class<?>  class1,
boolean  is_min_included,
boolean  is_max_included
 

Constructs a Range object given the Class of the elements in the Range. Whether the minimum value and the maximum value are considered inclusive is specified via the isMinIncluded and isMaxIncluded variables.

Parameters:
class1 Class
is_min_included boolean
is_max_included boolean


Member Function Documentation

Class kddml.Core.Scalar.RangeType.getElementClass  ) 
 

Returns the Class of the elements of this Range.

Returns:
Class

Reimplemented in kddml.Core.Scalar.IntegerRangeType, and kddml.Core.Scalar.RealRangeType.

Object kddml.Core.Scalar.RangeType.convertValue String  value  )  [virtual]
 

Returns the value of the input argument as java.lang.Object. This depends on the type of the scalar. E.g. for a list of integer (such as 3, 5, 7), the method returns an int[], such as [3, 5, 7]. Returns null if the input value cannot be converted.

Parameters:
value String the expression representing the scalar (e.g. "3+2", "sunny", "high, low").
Returns:
Object

Implements kddml.Core.Scalar.KDDMLScalarType.

abstract boolean kddml.Core.Scalar.RangeType.checkValue String  value  )  [pure virtual]
 

Checks if the input value have the right type. Input value is given as java.lang.String. Returns true if the type is correct; returns false otherwise.

Parameters:
value String
Returns:
boolean

Implements kddml.Core.Scalar.KDDMLScalarType.

Implemented in kddml.Core.Scalar.IntegerRangeType, and kddml.Core.Scalar.RealRangeType.


Generated on Thu Feb 23 13:04:46 2006 for kddml by  doxygen 1.4.3