All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.kitesdk.data.RefinableView Maven / Gradle / Ivy

Go to download

The Kite Data Core module provides simple, intuitive APIs for working with datasets in the Hadoop Platform.

There is a newer version: 1.1.0
Show newest version
/*
 * Copyright 2013 Cloudera.
 *
 * 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 org.kitesdk.data;

import javax.annotation.concurrent.Immutable;

/**
 * A {@code RefinableView} specifies a subset of a {@link Dataset} by one or 
 * more logical constraints.
 *
 * @param 
 *      The type of entities stored in the {@code Dataset} underlying this
 *      {@code RefinableView}.
 * @since 0.11.0
 */
@Immutable
public interface RefinableView extends View {

  /**
   * Creates a sub-{@code View}, restricted to entities whose name
   * field is equal to any of the given values. If you specify no 
   * values, the view is restricted to entities whose 
   * name field is non-null.
   *
   * @param name the field name of the entity
   * @return the restricted view
   */
  RefinableView with(String name, Object... values);

  /**
   * Creates a sub-{@code View}, restricted to entities whose name 
   * field is greater than or equal to the given value.
   *
   * @param name the field name of the entity
   * @return the restricted view
   */
  RefinableView from(String name, Comparable value);

  /**
   * Creates a sub-{@code View}, restricted to entities whose name 
   * field is greater than the given value.
   *
   * @param name the field name of the entity
   * @return the restricted view
   */
  RefinableView fromAfter(String name, Comparable value);

  /**
   * Creates a sub-{@code View}, restricted to entities whose name 
   * field is less than or equal to the given value.
   *
   * @param name the field name of the entity
   * @return the restricted view
   */
  RefinableView to(String name, Comparable value);

  /**
   * Creates a sub-{@code View}, restricted to entities whose name 
   * field is less than the given value.
   *
   * @param name the field name of the entity
   * @return the restricted view
   */
  RefinableView toBefore(String name, Comparable value);

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy