Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
  /*
   * Licensed under the Apache License, Version 2.0 (the "License");
   * you may not use this file except in compliance with the License.
   * You may obtain a copy of the License at
   *
   *     http://www.apache.org/licenses/LICENSE-2.0
   *
   * Unless required by applicable law or agreed to in writing, software
   * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
 package com.facebook.presto.testing;
 
 
 import java.util.List;
 
 import static com.google.common.base.Preconditions.checkNotNull;
 
 public class NullOutputOperator
         implements Operator
 {
     public static class NullOutputFactory
             implements OutputFactory
     {
         @Override
         public OperatorFactory createOutputOperator(int operatorIdList<TypesourceType)
         {
             return new NullOutputOperatorFactory(operatorIdsourceType);
         }
     }
 
     public static class NullOutputOperatorFactory
             implements OperatorFactory
     {
         private final int operatorId;
         private final List<Typetypes;
 
         public NullOutputOperatorFactory(int operatorIdList<Typetypes)
         {
             this. = operatorId;
             this. = types;
         }
 
         @Override
         public List<TypegetTypes()
         {
             return ;
         }
 
         @Override
         public Operator createOperator(DriverContext driverContext)
         {
             OperatorContext operatorContext = driverContext.addOperatorContext(NullOutputOperator.class.getSimpleName());
             return new NullOutputOperator(operatorContext);
         }
 
         @Override
         public void close()
         {
         }
     }
 
     private final OperatorContext operatorContext;
     private final List<Typetypes;
     private boolean finished;
 
     public NullOutputOperator(OperatorContext operatorContextList<Typetypes)
     {
         this. = checkNotNull(operatorContext"operatorContext is null");
         this. = ImmutableList.copyOf(checkNotNull(types"types is null"));
     }
 
     @Override
     {
         return ;
     }
 
     @Override
     public List<TypegetTypes()
     {
         return ;
     }
 
     @Override
     public void finish()
     {
          = true;
     }
    @Override
    public boolean isFinished()
    {
        return ;
    }
    @Override
    public boolean needsInput()
    {
        return true;
    }
    @Override
    public void addInput(Page page)
    {
    }
    @Override
    public Page getOutput()
    {
        return null;
    }
New to GrepCode? Check out our FAQ X