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

com.scalar.db.sql.common.EmptyResultSet Maven / Gradle / Ivy

There is a newer version: 3.14.0
Show newest version
package com.scalar.db.sql.common;

import com.scalar.db.sql.ColumnDefinitions;
import com.scalar.db.sql.Record;
import com.scalar.db.sql.ResultSet;
import java.util.Collections;
import java.util.Iterator;
import java.util.List;
import java.util.Optional;
import javax.annotation.Nonnull;

public enum EmptyResultSet implements ResultSet {
  INSTANCE;

  @Override
  public Optional one() {
    return Optional.empty();
  }

  @Override
  public List all() {
    return Collections.emptyList();
  }

  @Override
  public ColumnDefinitions getColumnDefinitions() {
    return EmptyColumnDefinitions.INSTANCE;
  }

  @Nonnull
  @Override
  public Iterator iterator() {
    return Collections.emptyIterator();
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy