com.google.cloud.dataflow.sdk.values

## Class PValueBase

- java.lang.Object
- - com.google.cloud.dataflow.sdk.values.POutputValueBase
  - - com.google.cloud.dataflow.sdk.values.PValueBase

All Implemented Interfaces:
  PInput, POutput, PValue

Direct Known Subclasses:
  TypedPValue

    public abstract class PValueBase
    extends POutputValueBase
    implements PValue

A `PValueBase` is an abstract base class that provides sensible default implementations for methods of `PValue`. In particular, this includes functionality for getting/setting:

- The `Pipeline` that the `PValue` is part of.
- Whether the `PValue` has bee finalized (as an input or an output), after which its properties can no longer be changed.

For internal use.

### Constructor Summary

Constructors
`protected` `PValueBase()` No-arg constructor for Java serialization only.
`protected` `PValueBase(Pipeline pipeline)`

### Method Summary

All Methods Instance Methods Concrete Methods
`Collection<? extends PValue>` `expand()` Expands this `POutput` into a list of its component output `PValues`.
`void` `finishSpecifying()` After building, finalizes this `PInput` to make it ready for being used as an input to a `PTransform`.
`protected String` `getKindString()` Returns a `String` capturing the kind of this `PValueBase`.
`String` `getName()` Returns the name of this `PValueBase`.
`boolean` `isFinishedSpecifyingInternal()` Returns whether this `PValueBase` has been finalized, and its core properties, e.g., name, can no longer be changed.
`void` `recordAsOutput(AppliedPTransform<?,?,?> transform)` Records that this `POutputValueBase` is an output with the given name of the given `AppliedPTransform`.
`protected void` `recordAsOutput(AppliedPTransform<?,?,?> transform, String outName)` Records that this `POutputValueBase` is an output with the given name of the given `AppliedPTransform` in the given `Pipeline`.
`PValueBase` `setName(String name)` Sets the name of this `PValueBase`.
`String` `toString()`

### Methods inherited from class com.google.cloud.dataflow.sdk.values.POutputValueBase

`finishSpecifyingOutput, getPipeline, getProducingTransformInternal`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

### Methods inherited from interface com.google.cloud.dataflow.sdk.values.PValue

`getProducingTransformInternal`

### Methods inherited from interface com.google.cloud.dataflow.sdk.values.POutput

`finishSpecifyingOutput, getPipeline`

### Methods inherited from interface com.google.cloud.dataflow.sdk.values.PInput

`getPipeline`

### Constructor Detail

#### PValueBase

    protected PValueBase(Pipeline pipeline)

#### PValueBase

    protected PValueBase()

No-arg constructor for Java serialization only. The resulting `PValueBase` is unlikely to be valid.

### Method Detail

#### getName

    public String getName()

Returns the name of this `PValueBase`.

By default, the name of a `PValueBase` is based on the name of the `PTransform` that produces it. It can be specified explicitly by calling `setName(java.lang.String)`.

Specified by:
  `getName` in interface `PValue`
Throws:
  `IllegalStateException` - if the name hasn't been set yet

#### setName

    public PValueBase setName(String name)

Sets the name of this `PValueBase`. Returns `this`.

Throws:
  `IllegalStateException` - if this `PValueBase` has already been finalized and may no longer be set.

#### recordAsOutput

    public void recordAsOutput(AppliedPTransform<?,?,?> transform)

Description copied from class: `POutputValueBase`
Records that this `POutputValueBase` is an output with the given name of the given `AppliedPTransform`.

To be invoked only by `POutput.recordAsOutput(com.google.cloud.dataflow.sdk.transforms.AppliedPTransform<?, ?, ?>)` implementations. Not to be invoked directly by user code.

Specified by:
  `recordAsOutput` in interface `POutput`
Overrides:
  `recordAsOutput` in class `POutputValueBase`

#### recordAsOutput

    protected void recordAsOutput(AppliedPTransform<?,?,?> transform,
                                  String outName)

Records that this `POutputValueBase` is an output with the given name of the given `AppliedPTransform` in the given `Pipeline`.

To be invoked only by `POutput.recordAsOutput(com.google.cloud.dataflow.sdk.transforms.AppliedPTransform<?, ?, ?>)` implementations. Not to be invoked directly by user code.

#### isFinishedSpecifyingInternal

    public boolean isFinishedSpecifyingInternal()

Returns whether this `PValueBase` has been finalized, and its core properties, e.g., name, can no longer be changed.

For internal use only.

#### expand

    public Collection<? extends PValue> expand()

Description copied from interface: `POutput`
Expands this `POutput` into a list of its component output `PValues`.

- A `PValue` expands to itself.
- A tuple or list of `PValues` (such as `PCollectionTuple` or `PCollectionList`) expands to its component `PValue PValues`.

Not intended to be invoked directly by user code.

Specified by:
  `expand` in interface `PInput`
Specified by:
  `expand` in interface `POutput`

#### finishSpecifying

    public void finishSpecifying()

Description copied from interface: `PInput`

After building, finalizes this `PInput` to make it ready for being used as an input to a `PTransform`.

Automatically invoked whenever `apply()` is invoked on this `PInput`, so users do not normally call this explicitly.

Specified by:
  `finishSpecifying` in interface `PInput`

#### toString

    public String toString()

Overrides:
  `toString` in class `Object`

#### getKindString

    protected String getKindString()

Returns a `String` capturing the kind of this `PValueBase`.

By default, uses the base name of the current class as its kind string.