org.dasein.attributes
Class DataTypeFactory.Constraint

java.lang.Object
  extended by org.dasein.attributes.DataTypeFactory.Constraint
Enclosing class:
DataTypeFactory<V>

public static class DataTypeFactory.Constraint
extends Object

A constraint helps narrow down the set of possible values associated with the underlying data type. In general, a constraint indicates that the set of valid values for this data type is constrained by a value from another data type.

Last modified: $Date: 2009/01/30 23:01:50 $

Version:
$Revision: 1.7 $
Author:
George Reese

Constructor Summary
DataTypeFactory.Constraint(String nom, DataType<?> t)
           
DataTypeFactory.Constraint(String nom, DataType<?> t, boolean cmpl)
          Constructs a new constraint.
 
Method Summary
 String getName()
           
 DataType<?> getType()
           
 boolean isComplete()
           
 DataTypeFactory.Constraint newConstraint(DataType<?> t)
          Makes a copy of this constraint with a different data type.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DataTypeFactory.Constraint

public DataTypeFactory.Constraint(String nom,
                                  DataType<?> t)

DataTypeFactory.Constraint

public DataTypeFactory.Constraint(String nom,
                                  DataType<?> t,
                                  boolean cmpl)
Constructs a new constraint.

Parameters:
nom - the name identifying the constraint
t - the data type governing the constraint
Method Detail

isComplete

public boolean isComplete()

getName

public String getName()
Returns:
the name of the constraint

getType

public DataType<?> getType()
Returns:
the data type governing the constraint

newConstraint

public DataTypeFactory.Constraint newConstraint(DataType<?> t)
Makes a copy of this constraint with a different data type. When constraints are first constructed, type parameters are generally unknown. This method let's you refine the constraints as you learn more about the type info.

Parameters:
t - the new data type
Returns:
a copy of this constraint with the new data type


Copyright © 2011 enStratus Networks LLC. All Rights Reserved.