private boolean setStartEndProperties(String propertyName, TermList list, Map<String, CSSProperty> properties, Map<String, Term<?>> values) {
switch (list.size()) {
case 0:
return false;
case 1:
Term single = list.get(0);
CSSProperty property;
if (single instanceof TermIdent) {
CSSProperty identProperty = genericPropertyRaw(GridStartEnd.class, null, (TermIdent) single);
if (GridStartEnd.SPAN.equals(identProperty)) {
return false;
} else if (identProperty == GridStartEnd.AUTO || identProperty == GridStartEnd.NONE) {
property = identProperty;
} else {
property = GridStartEnd.identificator;
}
} else if (single instanceof TermInteger) {
property = GridStartEnd.number;
} else {
return false;
}
properties.put(propertyName, property);
values.put(propertyName, single);
break;
default:
properties.put(propertyName, GridStartEnd.component_values);
values.put(propertyName, list);
}
return true;
}