JESS: Setting slot values using Java api

"Donald Winston" <[email protected]>
Newsgroups gmane.comp.java.jess
Message-ID <29706_1285152697_o8MApBZx030526_5B425BC7-F0E9-47BB-8442-6D286525F5A5@yahoo.com>
When the "slotType" is "ANY" my value is "<UNKNOWN>". So the RU.ANY data type cannot be used this way and I have to use one of the others?

...
fact.setSlotValue(name, getJessValue(slotType, value));
...

private Value getJessValue(String type, String value) throws JessException {
		if ("ANY".equals(type) == true)
			return new Value(value, RU.ANY);
		else if ("STRING".equals(type) == true)
			return new Value(value, RU.STRING);
		else if ("INTEGER".equals(type) == true)
			return new Value(Integer.parseInt(value), RU.INTEGER);
		else if ("FLOAT".equals(type) == true)
			return new Value(Float.parseFloat(value), RU.FLOAT);
		else if ("SYMBOL".equals(type) == true)
			return new Value(value, RU.SYMBOL);
		else if ("LONG".equals(type) == true)
			return new Value(Long.parseLong(value), RU.LONG);
		else
			return new Value(value, RU.ANY);
	}
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.