private void expectNonNull(LexicalUnit lu) { if (lu == null) { throw createInvalidLexicalUnitDOMException((short)-1); } }
private void expectNonNull(LexicalUnit lu) { if (lu == null) { throw createInvalidLexicalUnitDOMException((short)-1); } }
private void expectNonNull(LexicalUnit lu) { if (lu == null) { throw createInvalidLexicalUnitDOMException((short)-1); } }
private void expectComma(LexicalUnit lu) { if (lu.getLexicalUnitType() != LexicalUnit.SAC_OPERATOR_COMMA) { throw createInvalidLexicalUnitDOMException (lu.getLexicalUnitType()); } }
private void expectComma(LexicalUnit lu) { if (lu.getLexicalUnitType() != LexicalUnit.SAC_OPERATOR_COMMA) { throw createInvalidLexicalUnitDOMException (lu.getLexicalUnitType()); } }
private void expectComma(LexicalUnit lu) { if (lu.getLexicalUnitType() != LexicalUnit.SAC_OPERATOR_COMMA) { throw createInvalidLexicalUnitDOMException (lu.getLexicalUnitType()); } }
private void expectIdent(LexicalUnit lu) { if (lu.getLexicalUnitType() != LexicalUnit.SAC_IDENT) { throw createInvalidLexicalUnitDOMException (lu.getLexicalUnitType()); } }
private void expectIdent(LexicalUnit lu) { if (lu.getLexicalUnitType() != LexicalUnit.SAC_IDENT) { throw createInvalidLexicalUnitDOMException (lu.getLexicalUnitType()); } }
private void expectIdent(LexicalUnit lu) { if (lu.getLexicalUnitType() != LexicalUnit.SAC_IDENT) { throw createInvalidLexicalUnitDOMException (lu.getLexicalUnitType()); } }
/** * Creates a float value usable as a component of an RGBColor. */ protected float getColorValue(LexicalUnit lu) { expectNonNull(lu); switch (lu.getLexicalUnitType()) { case LexicalUnit.SAC_INTEGER: return lu.getIntegerValue(); case LexicalUnit.SAC_REAL: return lu.getFloatValue(); } throw createInvalidLexicalUnitDOMException(lu.getLexicalUnitType()); } }
/** * Creates a float value usable as a component of an RGBColor. */ protected float getColorValue(LexicalUnit lu) { expectNonNull(lu); switch (lu.getLexicalUnitType()) { case LexicalUnit.SAC_INTEGER: return lu.getIntegerValue(); case LexicalUnit.SAC_REAL: return lu.getFloatValue(); } throw createInvalidLexicalUnitDOMException(lu.getLexicalUnitType()); } }
/** * Creates a float value usable as a component of an RGBColor. */ protected float getColorValue(LexicalUnit lu) { expectNonNull(lu); switch (lu.getLexicalUnitType()) { case LexicalUnit.SAC_INTEGER: return lu.getIntegerValue(); case LexicalUnit.SAC_REAL: return lu.getFloatValue(); } throw createInvalidLexicalUnitDOMException(lu.getLexicalUnitType()); } }
throw createInvalidLexicalUnitDOMException (lu.getLexicalUnitType());
throw createInvalidLexicalUnitDOMException (lu.getLexicalUnitType());
throw createInvalidLexicalUnitDOMException (lu.getLexicalUnitType());
private Value createDeviceColorValue(LexicalUnit lu, Value v, int expectedComponents) { lu = lu.getParameters(); boolean nChannel = (expectedComponents <= 0); DeviceColor col = new DeviceColor(nChannel); col.append(getColorValue(lu)); LexicalUnit lastUnit = lu; lu = lu.getNextLexicalUnit(); while (lu != null) { expectComma(lu); lu = lu.getNextLexicalUnit(); col.append(getColorValue(lu)); lastUnit = lu; lu = lu.getNextLexicalUnit(); } if (!nChannel && expectedComponents != col.getNumberOfColors()) { throw createInvalidLexicalUnitDOMException(lastUnit.getLexicalUnitType()); } return col; }
private Value createDeviceColorValue(LexicalUnit lu, Value v, int expectedComponents) { lu = lu.getParameters(); boolean nChannel = (expectedComponents <= 0); DeviceColor col = new DeviceColor(nChannel); col.append(getColorValue(lu)); LexicalUnit lastUnit = lu; lu = lu.getNextLexicalUnit(); while (lu != null) { expectComma(lu); lu = lu.getNextLexicalUnit(); col.append(getColorValue(lu)); lastUnit = lu; lu = lu.getNextLexicalUnit(); } if (!nChannel && expectedComponents != col.getNumberOfColors()) { throw createInvalidLexicalUnitDOMException(lastUnit.getLexicalUnitType()); } return col; }
private Value createDeviceColorValue(LexicalUnit lu, Value v, int expectedComponents) { lu = lu.getParameters(); boolean nChannel = (expectedComponents <= 0); DeviceColor col = new DeviceColor(nChannel); col.append(getColorValue(lu)); LexicalUnit lastUnit = lu; lu = lu.getNextLexicalUnit(); while (lu != null) { expectComma(lu); lu = lu.getNextLexicalUnit(); col.append(getColorValue(lu)); lastUnit = lu; lu = lu.getNextLexicalUnit(); } if (!nChannel && expectedComponents != col.getNumberOfColors()) { throw createInvalidLexicalUnitDOMException(lastUnit.getLexicalUnitType()); } return col; }