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

edu.isi.nlp.strings.offsets.OffsetGroupFunctions Maven / Gradle / Ivy

The newest version!
package edu.isi.nlp.strings.offsets;

import com.google.common.base.Function;
import com.google.common.base.Optional;
import javax.annotation.Generated;
import javax.annotation.ParametersAreNonnullByDefault;

/**
 * Projection functions and predicates that corresponds to attributes of {@link OffsetGroup}.
 */
@SuppressWarnings({"all"})
@ParametersAreNonnullByDefault
@Generated({"Immutables.generator", "OffsetGroup"})
public final class OffsetGroupFunctions {
  private OffsetGroupFunctions() {}

  /**
   * Projection function from instance of OffsetGroup to attribute {@link OffsetGroup#byteOffset() byteOffset}.
   * @return {@code byteOffset} function instance
   */
  public static Function> byteOffset() {
    return ByteOffsetFunction.INSTANCE;
  }

  private enum ByteOffsetFunction implements Function> {
    INSTANCE;
    @Override
    public Optional apply(OffsetGroup input) {
      return input.byteOffset();
    }
    @Override
    public String toString() {
      return "OffsetGroupFunctions.byteOffset()";
    }
  }

  /**
   * Projection function from instance of OffsetGroup to attribute {@link OffsetGroup#charOffset() charOffset}.
   * @return {@code charOffset} function instance
   */
  public static Function charOffset() {
    return CharOffsetFunction.INSTANCE;
  }

  private enum CharOffsetFunction implements Function {
    INSTANCE;
    @Override
    public CharOffset apply(OffsetGroup input) {
      return input.charOffset();
    }
    @Override
    public String toString() {
      return "OffsetGroupFunctions.charOffset()";
    }
  }

  /**
   * Projection function from instance of OffsetGroup to attribute {@link OffsetGroup#edtOffset() edtOffset}.
   * @return {@code edtOffset} function instance
   */
  public static Function edtOffset() {
    return EdtOffsetFunction.INSTANCE;
  }

  private enum EdtOffsetFunction implements Function {
    INSTANCE;
    @Override
    public EDTOffset apply(OffsetGroup input) {
      return input.edtOffset();
    }
    @Override
    public String toString() {
      return "OffsetGroupFunctions.edtOffset()";
    }
  }

  /**
   * Projection function from instance of OffsetGroup to attribute {@link OffsetGroup#asrTime() asrTime}.
   * @return {@code asrTime} function instance
   */
  public static Function> asrTime() {
    return AsrTimeFunction.INSTANCE;
  }

  private enum AsrTimeFunction implements Function> {
    INSTANCE;
    @Override
    public Optional apply(OffsetGroup input) {
      return input.asrTime();
    }
    @Override
    public String toString() {
      return "OffsetGroupFunctions.asrTime()";
    }
  }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy