com.thaiopensource.relaxng.output.xsd.Guide Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of trang Show documentation
Show all versions of trang Show documentation
Jing/Trang - tools for validating and translating RelaxNG
The newest version!
package com.thaiopensource.relaxng.output.xsd;
import java.util.Set;
import java.util.HashSet;
class Guide {
private boolean defaultGroupEnableAbstractElements;
private final Set nonDefaultGroupSet = new HashSet();
Guide(boolean defaultGroupEnableAbstractElements) {
this.defaultGroupEnableAbstractElements = defaultGroupEnableAbstractElements;
}
void setDefaultGroupEnableAbstractElements(boolean defaultGroupEnableAbstractElements) {
this.defaultGroupEnableAbstractElements = defaultGroupEnableAbstractElements;
}
void setGroupEnableAbstractElement(String name, boolean enable) {
if (enable != defaultGroupEnableAbstractElements)
nonDefaultGroupSet.add(name);
}
boolean getGroupEnableAbstractElement(String name) {
return nonDefaultGroupSet.contains(name)
? !defaultGroupEnableAbstractElements
: defaultGroupEnableAbstractElements;
}
boolean getDefaultGroupEnableAbstractElements() {
return defaultGroupEnableAbstractElements;
}
}