001 package railo.runtime.text.feed; 002 003 public class El { 004 005 public static short QUANTITY_0_1=0; 006 public static short QUANTITY_0_N=4; 007 public static short QUANTITY_1=8; 008 public static short QUANTITY_1_N=16; 009 public static final short QUANTITY_AUTO = QUANTITY_0_1; 010 011 private Attr[] attrs; 012 private short quantity; 013 private boolean hasChildren; 014 015 016 public El(short quantity,Attr[] attrs,boolean hasChildren) { 017 this.quantity=quantity; 018 this.attrs=attrs; 019 this.hasChildren=hasChildren; 020 } 021 022 public El(short quantity,Attr[] attrs) { 023 this(quantity,attrs,false); 024 } 025 026 public El(short quantity,Attr attr,boolean hasChildren) { 027 this(quantity,new Attr[]{attr},hasChildren); 028 } 029 030 public El(short quantity,Attr attr) { 031 this(quantity,new Attr[]{attr}); 032 } 033 034 public El(short quantity,boolean hasChildren) { 035 this(quantity, (Attr[])null,hasChildren); 036 } 037 public El(short quantity) { 038 this(quantity, (Attr[])null); 039 } 040 041 /** 042 * @return the hasChildren 043 */ 044 public boolean isHasChildren() { 045 return hasChildren; 046 } 047 048 /** 049 * @return the attrs 050 */ 051 public Attr[] getAttrs() { 052 return attrs; 053 } 054 /** 055 * @return the quantity 056 */ 057 public short getQuantity() { 058 return quantity; 059 } 060 public boolean isQuantity(short quantity) { 061 return this.quantity==quantity; 062 } 063 064 }