public String toString(int zero) { StringBuffer ret = new StringBuffer(256); boolean first = true; if (isValid()) { int tooMuch = 0; int saveLen; for (ListIterator<MultipleSyntaxElements> i = getChildContainers().listIterator(); i.hasNext(); ) { if (!first) ret.append('+'); saveLen = ret.length(); MultipleSyntaxElements dataList = i.next(); if (dataList != null) ret.append(dataList.toString(0)); if (ret.length() == saveLen && !first) { tooMuch++; } else { tooMuch = 0; } first = false; } int retlen = ret.length(); ret.delete(retlen - tooMuch, retlen); ret.append('\''); } return ret.toString(); }
public void getElementPaths(Properties p, int[] segref, int[] degref, int[] deref) { if (isValid()) { p.setProperty(Integer.toString(segref[0]), getPath()); degref = new int[1]; degref[0] = 1; for (Iterator<MultipleSyntaxElements> i = getChildContainers().iterator(); i.hasNext(); ) { MultipleSyntaxElements l = i.next(); if (l != null) { l.getElementPaths(p, segref, degref, null); } } segref[0]++; } }
public void destroy() { List<SyntaxElement> children = getElements(); for (Iterator<SyntaxElement> i = children.iterator(); i.hasNext(); ) { DEFactory.getInstance().unuseObject(i.next()); } valids.clear(); valids = null; super.destroy(); }
public void init( Node deref, char delimiter, String path, char predelim0, char predelim1, StringBuffer res, int fullResLen, Document syntax, Hashtable<String, String> predefs, Hashtable<String, String> valids) { super.init(deref, path, predelim0, predelim1, res, fullResLen, syntax, predefs, valids); initData( deref, delimiter, path, predelim0, predelim1, res, fullResLen, syntax, predefs, valids); }
protected void validateOneElement(SyntaxElement elem, int idx) { ((DE) elem).setValids(valids); super.validateOneElement(elem, idx); }
public void init(Node dedef, char delimiter, String path, Document syntax) { super.init(dedef, path, syntax); initData(dedef, delimiter, path, syntax); }