long beginTime_ms = System.currentTimeMillis();
long maxTime_ms = Math.round(maxTime * 1000);
propertyValueOrTransition = propertyValueOrTransition.toLowerCase();
String[] splitted = propertyValueOrTransition.split(" *: *");
if (splitted.length != 2) {
throw new QTasteDataException("Invalid syntax");
}
String property = splitted[0];
if (property.length() == 0) {
throw new QTasteDataException("Invalid syntax");
}
String transition = splitted[1];
boolean mustBeAtBegin = transition.matches("^\\[.*");
if (mustBeAtBegin) {
transition = transition.replaceFirst("^\\[ *", "");
}
boolean mustBeAtEnd = transition.matches(".*\\]$");
if (mustBeAtEnd) {
transition = transition.replaceFirst(" *\\]$", "");
}
String[] values = transition.split(" *-> *");
if ((values.length != 1) && (values.length != 2)) {
throw new QTasteDataException("Invalid syntax");
}
String expectedValueOrTransition = propertyValueOrTransition.replaceFirst(".*: *", "");
long remainingTime_ms = maxTime_ms - (System.currentTimeMillis() - beginTime_ms);
checkPropertyValueOrTransition(property, values, mustBeAtBegin, mustBeAtEnd, remainingTime_ms, expectedValueOrTransition);