/** * Copies this instance and returns the copy. * @return The copy. */ @Override public DoubleCesiumWriter clone() { return new DoubleCesiumWriter(this); }
/** * Writes the value expressed as a {@code number}, which is the number. * @param dates The dates at which the value is specified. * @param values The values corresponding to each date. */ public final void writeNumber(List<JulianDate> dates, List<Double> values) { writeNumber(dates, values, 0, dates.size()); }
/** * Writes the value expressed as a {@code number}, which is the number. * @param value The value. */ public final void writeNumber(double value) { final String PropertyName = NumberPropertyName; if (getForceInterval()) { openIntervalIfNecessary(); } if (getIsInterval()) { getOutput().writePropertyName(PropertyName); } getOutput().writeValue(value); }
/** * Writes the value expressed as a {@code number}, which is the number. * @param dates The dates at which the value is specified. * @param values The value corresponding to each date. * @param startIndex The index of the first element to write. * @param length The number of elements to write. */ public final void writeNumber(List<JulianDate> dates, List<Double> values, int startIndex, int length) { final String PropertyName = NumberPropertyName; openIntervalIfNecessary(); CesiumWritingHelper.writeDouble(getOutput(), PropertyName, dates, values, startIndex, length); }
@Test public final void doubleCanBeWrittenInsideInterval() { JulianDate startDate = new GregorianDate(2012, 6, 7, 12, 0, 0D).toJulianDate(); { final PacketCesiumWriter usingExpression_3 = (getPacket()); try { { DoubleCesiumWriter writer = new DoubleCesiumWriter("foo"); try { writer.open(getOutputStream()); writer.writeInterval(startDate, startDate.addSeconds(100.0)); writer.writeNumber(1.23); } finally { DisposeHelper.dispose(writer); } } } finally { DisposeHelper.dispose(usingExpression_3); } } Assert.assertEquals("{\"foo\":{\"interval\":\"20120607T12Z/20120607T120140Z\",\"number\":1.23}}", getStringWriter().toString()); }
@Test public final void doubleCanBeWrittenAsSimpleNumber() { { final PacketCesiumWriter usingExpression_2 = (getPacket()); try { { DoubleCesiumWriter writer = new DoubleCesiumWriter("foo"); try { writer.open(getOutputStream()); writer.writeNumber(1.23); } finally { DisposeHelper.dispose(writer); } } } finally { DisposeHelper.dispose(usingExpression_2); } } Assert.assertEquals("{\"foo\":1.23}", getStringWriter().toString()); }
/** * Writes a value for the {@code maximumScale} property as a {@code reference} value. The {@code maximumScale} property specifies the maximum scale size of the model. This is used as an upper limit for {@code minimumPixelSize}. * @param value The earliest date of the interval. */ public final void writeMaximumScalePropertyReference(String value) { { cesiumlanguagewriter.DoubleCesiumWriter writer = openMaximumScaleProperty(); try { writer.writeReference(value); } finally { DisposeHelper.dispose(writer); } } }
@Test public final void doubleCanBeWrittenInsideInterval() { JulianDate startDate = new GregorianDate(2012, 6, 7, 12, 0, 0D).toJulianDate(); { final PacketCesiumWriter usingExpression_1 = (getPacket()); try { { DoubleCesiumWriter writer = new DoubleCesiumWriter("foo"); try { writer.open(getOutputStream()); writer.writeInterval(startDate, startDate.addSeconds(100.0)); writer.writeNumber(1.23); } finally { DisposeHelper.dispose(writer); } } } finally { DisposeHelper.dispose(usingExpression_1); } } Assert.assertEquals("{\"foo\":{\"interval\":\"20120607T12Z/20120607T120140Z\",\"number\":1.23}}", getStringWriter().toString()); }
@Test public final void doubleCanBeWrittenAsSimpleNumber() { { final PacketCesiumWriter usingExpression_0 = (getPacket()); try { { DoubleCesiumWriter writer = new DoubleCesiumWriter("foo"); try { writer.open(getOutputStream()); writer.writeNumber(1.23); } finally { DisposeHelper.dispose(writer); } } } finally { DisposeHelper.dispose(usingExpression_0); } } Assert.assertEquals("{\"foo\":1.23}", getStringWriter().toString()); }
/** * Writes a value for the {@code outlineWidth} property as a {@code reference} value. The {@code outlineWidth} property specifies the width of the cylinder outline. If not specified, the default value is 1.0. * @param value The earliest date of the interval. */ public final void writeOutlineWidthPropertyReference(String value) { { cesiumlanguagewriter.DoubleCesiumWriter writer = openOutlineWidthProperty(); try { writer.writeReference(value); } finally { DisposeHelper.dispose(writer); } } }
/** * Writes the value expressed as a {@code reference}, which is the number specified as a reference to another property. * @param identifier The identifier of the object which contains the referenced property. * @param propertyNames The hierarchy of properties to be indexed on the referenced object. */ public final void writeReference(String identifier, String[] propertyNames) { final String PropertyName = ReferencePropertyName; openIntervalIfNecessary(); getOutput().writePropertyName(PropertyName); CesiumWritingHelper.writeReference(getOutput(), identifier, propertyNames); }
/** * Writes a value for the {@code scale} property as a {@code number} value. The {@code scale} property specifies the scale of the model. If not specified, the default value is 1.0. * @param value The value. */ public final void writeScaleProperty(double value) { { cesiumlanguagewriter.DoubleCesiumWriter writer = openScaleProperty(); try { writer.writeNumber(value); } finally { DisposeHelper.dispose(writer); } } }
public cesiumlanguagewriter.DoubleCesiumWriter invoke() { return new DoubleCesiumWriter(TopRadiusPropertyName); } }, false);
/** * Writes a value for the {@code cellAlpha} property as a {@code reference} value. The {@code cellAlpha} property specifies the alpha value for the space between grid lines. This will be combined with the color alpha. If not specified, the default value is 0.1. * @param value The reference. */ public final void writeCellAlphaPropertyReference(Reference value) { { cesiumlanguagewriter.DoubleCesiumWriter writer = openCellAlphaProperty(); try { writer.writeReference(value); } finally { DisposeHelper.dispose(writer); } } }
/** * Writes the value expressed as a {@code reference}, which is the number specified as a reference to another property. * @param identifier The identifier of the object which contains the referenced property. * @param propertyName The property on the referenced object. */ public final void writeReference(String identifier, String propertyName) { final String PropertyName = ReferencePropertyName; openIntervalIfNecessary(); getOutput().writePropertyName(PropertyName); CesiumWritingHelper.writeReference(getOutput(), identifier, propertyName); }
/** * Writes a value for the {@code maximumScale} property as a {@code number} value. The {@code maximumScale} property specifies the maximum scale size of the model. This is used as an upper limit for {@code minimumPixelSize}. * @param value The value. */ public final void writeMaximumScaleProperty(double value) { { cesiumlanguagewriter.DoubleCesiumWriter writer = openMaximumScaleProperty(); try { writer.writeNumber(value); } finally { DisposeHelper.dispose(writer); } } }
public cesiumlanguagewriter.DoubleCesiumWriter invoke() { return new DoubleCesiumWriter(OutlineWidthPropertyName); } }, false);
/** * Writes a value for the {@code cellAlpha} property as a {@code reference} value. The {@code cellAlpha} property specifies the alpha value for the space between grid lines. This will be combined with the color alpha. If not specified, the default value is 0.1. * @param value The earliest date of the interval. */ public final void writeCellAlphaPropertyReference(String value) { { cesiumlanguagewriter.DoubleCesiumWriter writer = openCellAlphaProperty(); try { writer.writeReference(value); } finally { DisposeHelper.dispose(writer); } } }
/** * Writes the value expressed as a {@code reference}, which is the number specified as a reference to another property. * @param value The earliest date of the interval. */ public final void writeReference(String value) { final String PropertyName = ReferencePropertyName; openIntervalIfNecessary(); getOutput().writePropertyName(PropertyName); CesiumWritingHelper.writeReference(getOutput(), value); }
/** * Writes a value for the {@code length} property as a {@code number} value. The {@code length} property specifies the length of the cylinder. This value is required. * @param value The value. */ public final void writeLengthProperty(double value) { { cesiumlanguagewriter.DoubleCesiumWriter writer = openLengthProperty(); try { writer.writeNumber(value); } finally { DisposeHelper.dispose(writer); } } }