org.daisy.pipeline.css.impl.UnmodifiableTerm Maven / Gradle / Ivy
package org.daisy.pipeline.css.impl;
import cz.vutbr.web.css.Term;
public abstract class UnmodifiableTerm implements Term {
@Override
public T getValue() {
throw new UnsupportedOperationException("not implemented");
}
@Override
public Operator getOperator() {
return null;
}
@SuppressWarnings("unchecked")
@Override
public UnmodifiableTerm shallowClone() {
try {
return (UnmodifiableTerm)super.clone();
} catch (CloneNotSupportedException e) {
throw new InternalError("coding error");
}
}
@Override
public UnmodifiableTerm clone() {
return shallowClone();
}
@Override
public UnmodifiableTerm setValue(T value) {
throw new UnsupportedOperationException("Unmodifiable");
}
@Override
public UnmodifiableTerm setOperator(Operator operator) {
throw new UnsupportedOperationException("Unmodifiable");
}
}