Repository: beam
Updated Branches:
  refs/heads/master 2e766ced5 -> 5fe78440b


Fix some DoFn javadoc literals


Project: http://git-wip-us.apache.org/repos/asf/beam/repo
Commit: http://git-wip-us.apache.org/repos/asf/beam/commit/f360f47f
Tree: http://git-wip-us.apache.org/repos/asf/beam/tree/f360f47f
Diff: http://git-wip-us.apache.org/repos/asf/beam/diff/f360f47f

Branch: refs/heads/master
Commit: f360f47f9ca4f4054e9fb583c2a0f5dda9ee19ea
Parents: 18f3767
Author: Kenneth Knowles <k...@google.com>
Authored: Tue Feb 7 14:11:13 2017 -0800
Committer: Kenneth Knowles <k...@google.com>
Committed: Wed Feb 15 19:18:42 2017 -0800

----------------------------------------------------------------------
 .../org/apache/beam/sdk/transforms/DoFn.java    | 66 ++++++++++----------
 1 file changed, 32 insertions(+), 34 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/beam/blob/f360f47f/sdks/java/core/src/main/java/org/apache/beam/sdk/transforms/DoFn.java
----------------------------------------------------------------------
diff --git 
a/sdks/java/core/src/main/java/org/apache/beam/sdk/transforms/DoFn.java 
b/sdks/java/core/src/main/java/org/apache/beam/sdk/transforms/DoFn.java
index 2043ef0..6f88738 100644
--- a/sdks/java/core/src/main/java/org/apache/beam/sdk/transforms/DoFn.java
+++ b/sdks/java/core/src/main/java/org/apache/beam/sdk/transforms/DoFn.java
@@ -77,15 +77,15 @@ import org.joda.time.Instant;
  *
  * <p>Example usage:
  *
- * <pre>{@code
- * PCollection<String> lines = ... ;
- * PCollection<String> words =
- *     lines.apply(ParDo.of(new DoFn<String, String>() {
- *         {@literal @}ProcessElement
- *         public void processElement(ProcessContext c, BoundedWindow window) {
- *
- *         }}));
- * }</pre>
+ * <pre><code>
+ * {@literal PCollection<String>} lines = ... ;
+ * {@literal PCollection<String>} words =
+ *     {@literal lines.apply(ParDo.of(new DoFn<String, String>())} {
+ *         {@literal @ProcessElement}
+ *          public void processElement(ProcessContext c, BoundedWindow window) 
{
+ *            ...
+ *          }}));
+ * </code></pre>
  *
  * @param <InputT> the type of the (main) input elements
  * @param <OutputT> the type of the (main) output elements
@@ -385,21 +385,21 @@ public abstract class DoFn<InputT, OutputT> implements 
Serializable, HasDisplayD
    * subclass to your {@link ProcessElement @ProcessElement} or {@link OnTimer 
@OnTimer} method, and
    * annotate it with {@link StateId}. See the following code for an example:
    *
-   * <pre>{@code
-   * new DoFn<KV<Key, Foo>, Baz>() {
-   *   {@literal @}StateId("my-state-id")
-   *   private final StateSpec<K, ValueState<MyState>> myStateSpec =
+   * <pre><code>{@literal new DoFn<KV<Key, Foo>, Baz>()} {
+   *
+   *  {@literal @StateId("my-state-id")}
+   *  {@literal private final StateSpec<K, ValueState<MyState>>} myStateSpec =
    *       StateSpecs.value(new MyStateCoder());
    *
-   *   {@literal @}ProcessElement
+   *  {@literal @ProcessElement}
    *   public void processElement(
    *       ProcessContext c,
-   *       {@literal @}StateId("my-state-id") ValueState<MyState> myState) {
+   *      {@literal @StateId("my-state-id") ValueState<MyState> myState}) {
    *     myState.read();
    *     myState.write(...);
    *   }
    * }
-   * }</pre>
+   * </code></pre>
    *
    * <p>State is subject to the following validity conditions:
    *
@@ -429,24 +429,22 @@ public abstract class DoFn<InputT, OutputT> implements 
Serializable, HasDisplayD
    * {@link ProcessElement @ProcessElement} or {@link OnTimer @OnTimer} 
method, and annotate it with
    * {@link TimerId}. See the following code for an example:
    *
-   * <pre>{@code
-   * new DoFn<KV<Key, Foo>, Baz>() {
-   *   {@literal @}TimerId("my-timer-id")
-   *   private final TimerSpec myTimer = 
TimerSpecs.timerForDomain(TimeDomain.EVENT_TIME);
-   *
-   *   {@literal @}ProcessElement
-   *   public void processElement(
-   *       ProcessContext c,
-   *       {@literal @}TimerId("my-timer-id") Timer myTimer) {
-   *     myTimer.setForNowPlus(Duration.standardSeconds(...));
-   *   }
-   *
-   *   {@literal @}OnTimer("my-timer-id")
-   *   public void onMyTimer() {
-   *     ...
-   *   }
-   * }
-   * }</pre>
+   * <pre><code>{@literal new DoFn<KV<Key, Foo>, Baz>()} {
+   *   {@literal @TimerId("my-timer-id")}
+   *    private final TimerSpec myTimer = 
TimerSpecs.timerForDomain(TimeDomain.EVENT_TIME);
+   *
+   *   {@literal @ProcessElement}
+   *    public void processElement(
+   *        ProcessContext c,
+   *       {@literal @TimerId("my-timer-id") Timer myTimer}) {
+   *      myTimer.setForNowPlus(Duration.standardSeconds(...));
+   *    }
+   *
+   *   {@literal @OnTimer("my-timer-id")}
+   *    public void onMyTimer() {
+   *      ...
+   *    }
+   * }</code></pre>
    *
    * <p>Timers are subject to the following validity conditions:
    *

Reply via email to