private static void dispatchCheckValue(int type, String value)
            throws AttributeBadValueException
    {

        switch (type) {

        case BYTE:
            if(!checkByte(value))
                throw new AttributeBadValueException("`" + value + "' is not a Byte value.");
            break;

        case INT16:
            if(!checkShort(value))
                throw new AttributeBadValueException("`" + value + "' is not an Int16 value.");
            break;

        case UINT16:
            if(!checkUShort(value))
                throw new AttributeBadValueException("`" + value + "' is not an UInt16 value.");
            break;

        case INT32:
            if(!checkInt(value))
                throw new AttributeBadValueException("`" + value + "' is not an Int32 value.");
            break;

        case UINT32:
            if(!checkUInt(value))
                throw new AttributeBadValueException("`" + value + "' is not an UInt32 value.");
            break;

        case FLOAT32:
            if(!checkFloat(value))
                throw new AttributeBadValueException("`" + value + "' is not a Float32 value.");
            break;

        case FLOAT64:
            if(!checkDouble(value))
                throw new AttributeBadValueException("`" + value + "' is not a Float64 value.");
            break;

        //    case BOOLEAN:
        //      if(!checkBoolean(value))
        //	throw new AttributeBadValueException("`" + value + "' is not a Boolean value.");
        //      break;

        default:
            // Assume UNKNOWN, CONTAINER, STRING, and URL are okay.
        }
    }
private static void dispatchCheckValue(int type, String value)
            throws AttributeBadValueException
    {

        switch (type) {

        case BYTE:
            if(!checkByte(value))
                throw new AttributeBadValueException("`" + value + "' is not a Byte value.");
            break;

        case INT16:
            if(!checkShort(value))
                throw new AttributeBadValueException("`" + value + "' is not an Int16 value.");
            break;

        case UINT16:
            if(!checkUShort(value))
                throw new AttributeBadValueException("`" + value + "' is not an UInt16 value.");
            break;

        case INT32:
            if(!checkInt(value))
                throw new AttributeBadValueException("`" + value + "' is not an Int32 value.");
            break;

        case UINT32:
            if(!checkUInt(value))
                throw new AttributeBadValueException("`" + value + "' is not an UInt32 value.");
            break;

        case FLOAT32:
            if(!checkFloat(value))
                throw new AttributeBadValueException("`" + value + "' is not a Float32 value.");
            break;

        case FLOAT64:
            if(!checkDouble(value))
                throw new AttributeBadValueException("`" + value + "' is not a Float64 value.");
            break;

        
        
        
        

        default:
            
        }
    }
private static void dispatchCheckValue ( int type , String value ) throws AttributeBadValueException { switch ( type ) { case BYTE : if ( ! checkByte ( value ) ) throw new AttributeBadValueException ( "`" + value + "' is not a Byte value." ) ; break ; case INT16 : if ( ! checkShort ( value ) ) throw new AttributeBadValueException ( "`" + value + "' is not an Int16 value." ) ; break ; case UINT16 : if ( ! checkUShort ( value ) ) throw new AttributeBadValueException ( "`" + value + "' is not an UInt16 value." ) ; break ; case INT32 : if ( ! checkInt ( value ) ) throw new AttributeBadValueException ( "`" + value + "' is not an Int32 value." ) ; break ; case UINT32 : if ( ! checkUInt ( value ) ) throw new AttributeBadValueException ( "`" + value + "' is not an UInt32 value." ) ; break ; case FLOAT32 : if ( ! checkFloat ( value ) ) throw new AttributeBadValueException ( "`" + value + "' is not a Float32 value." ) ; break ; case FLOAT64 : if ( ! checkDouble ( value ) ) throw new AttributeBadValueException ( "`" + value + "' is not a Float64 value." ) ; break ; //    case BOOLEAN: //      if(!checkBoolean(value)) //	throw new AttributeBadValueException("`" + value + "' is not a Boolean value."); //      break; default : // Assume UNKNOWN, CONTAINER, STRING, and URL are okay. } }
Check if the value is legal for a given type.

@param type  the type of the value.
@param value the value <code>String</code>.
@throws AttributeBadValueException if the value is not a legal
member of type
Check if the value is legal for a given type .