Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
Copyright (C) 2014-2015 Philip Helger (www.helger.com) philip[at]helger[dot]com 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.helger.appbasics.exchange.bulkexport;
An implementation of IExportRecordProvider that uses a constant list of records.

Author(s):
Philip Helger
  private final List <IExportRecordm_aHeader = new ArrayList <IExportRecord> ();
  private final List <IExportRecordm_aBody;
  private final List <IExportRecordm_aFooter = new ArrayList <IExportRecord> ();
  public ConstantExportRecordProvider (@Nonnull final Iterable <? extends IExportRecordaBody)
  {
    this (nullaBodynull);
  }
  public ConstantExportRecordProvider (@Nullable final IExportRecord aHeader,
                                       @Nonnull final Iterable <? extends IExportRecordaBody)
  {
    this (aHeaderaBodynull);
  }
  public ConstantExportRecordProvider (@Nullable final IExportRecord aHeader,
                                       @Nonnull final Iterable <? extends IExportRecordaBody,
                                       @Nullable final IExportRecord aFooter)
  {
    ValueEnforcer.notNull (aBody"Body");
    if (aHeader != null)
      .add (aHeader);
     = ContainerHelper.newList (aBody);
    if (aFooter != null)
      .add (aFooter);
  }
  public Iterable <? extends IExportRecordgetHeaderRecords ()
  {
    return ;
  }
  public Iterable <? extends IExportRecordgetBodyRecords ()
  {
    return ;
  }
  public Iterable <? extends IExportRecordgetFooterRecords ()
  {
    return ;
  }
  public String toString ()
  {
    return new ToStringGenerator (this).append ("header")
                                       .append ("body")
                                       .append ("footer")
                                       .toString ();
  }
New to GrepCode? Check out our FAQ X