com.google.cloud.dataflow.examples.complete

## Class AutoComplete.ComputeTopCompletions

- java.lang.Object
- - com.google.cloud.dataflow.sdk.transforms.PTransform<PCollection<String>,PCollection<KV<String,List<com.google.cloud.dataflow.examples.complete.AutoComplete.CompletionCandidate>>>>
  - - com.google.cloud.dataflow.examples.complete.AutoComplete.ComputeTopCompletions

All Implemented Interfaces:
  HasDisplayData, Serializable

Enclosing class:
  AutoComplete

    public static class AutoComplete.ComputeTopCompletions
    extends PTransform<PCollection<String>,PCollection<KV<String,List<com.google.cloud.dataflow.examples.complete.AutoComplete.CompletionCandidate>>>>

A PTransform that takes as input a list of tokens and returns the most common tokens per prefix.

See Also:
  Serialized Form

### Field Summary

### Fields inherited from class com.google.cloud.dataflow.sdk.transforms.PTransform

`name`

### Constructor Summary

Constructors
`protected` `ComputeTopCompletions(int candidatesPerPrefix, boolean recursive)`

### Method Summary

All Methods Static Methods Instance Methods Concrete Methods
`PCollection<KV<String,List<com.google.cloud.dataflow.examples.complete.AutoComplete.CompletionCandidate>>>` `apply(PCollection<String> input)`
`static AutoComplete.ComputeTopCompletions` `top(int candidatesPerPrefix, boolean recursive)`

### Methods inherited from class com.google.cloud.dataflow.sdk.transforms.PTransform

`getDefaultOutputCoder, getDefaultOutputCoder, getDefaultOutputCoder, getKindString, getName, populateDisplayData, toString, validate`

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

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

### Constructor Detail

#### ComputeTopCompletions

    protected ComputeTopCompletions(int candidatesPerPrefix,
                                    boolean recursive)

### Method Detail

#### top

    public static AutoComplete.ComputeTopCompletions top(int candidatesPerPrefix,
                                                         boolean recursive)

#### apply

    public PCollection<KV<String,List<com.google.cloud.dataflow.examples.complete.AutoComplete.CompletionCandidate>>> apply(PCollection<String> input)

Overrides:
  `apply` in class `PTransform<PCollection<String>,PCollection<KV<String,List<com.google.cloud.dataflow.examples.complete.AutoComplete.CompletionCandidate>>>>`