Codota Logo
Range$Bound.isBounded
Code IndexAdd Codota to your IDE (free)

How to use
isBounded
method
in
org.springframework.data.domain.Range$Bound

Best Java code snippets using org.springframework.data.domain.Range$Bound.isBounded (Showing top 14 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
Connection c =
  • Codota IconDataSource dataSource;dataSource.getConnection()
  • Codota IconString url;DriverManager.getConnection(url)
  • Codota IconIdentityDatabaseUtil.getDBConnection()
  • Smart code suggestions by Codota
}
origin: spring-projects/spring-data-redis

@Override
public Long bitPos(byte[] key, boolean bit, Range<Long> range) {
  Assert.notNull(key, "Key must not be null!");
  Assert.notNull(range, "Range must not be null! Use Range.unbounded() instead.");
  List<byte[]> args = new ArrayList<>(3);
  args.add(LettuceConverters.toBit(bit));
  if (range.getLowerBound().isBounded()) {
    args.add(range.getLowerBound().getValue().map(LettuceConverters::toBytes).get());
  }
  if (range.getUpperBound().isBounded()) {
    args.add(range.getUpperBound().getValue().map(LettuceConverters::toBytes).get());
  }
  return Long.class.cast(connection.execute("BITPOS", key, args));
}
origin: spring-projects/spring-data-redis

@Nullable
@Override
public Long bitPos(byte[] key, boolean bit, Range<Long> range) {
  Assert.notNull(key, "Key must not be null!");
  Assert.notNull(range, "Range must not be null! Use Range.unbounded() instead.");
  BitPosParams params = null;
  if (range.getLowerBound().isBounded()) {
    params = range.getUpperBound().isBounded()
        ? new BitPosParams(range.getLowerBound().getValue().get(), range.getUpperBound().getValue().get())
        : new BitPosParams(range.getLowerBound().getValue().get());
  }
  try {
    if (isPipelined()) {
      pipeline(connection.newJedisResult(params != null ? connection.getRequiredPipeline().bitpos(key, bit, params)
          : connection.getRequiredPipeline().bitpos(key, bit)));
      return null;
    }
    if (isQueueing()) {
      transaction(
          connection.newJedisResult(params != null ? connection.getRequiredTransaction().bitpos(key, bit, params)
              : connection.getRequiredTransaction().bitpos(key, bit)));
      return null;
    }
    return params != null ? connection.getJedis().bitpos(key, bit, params) : connection.getJedis().bitpos(key, bit);
  } catch (Exception ex) {
    throw convertJedisAccessException(ex);
  }
}
origin: spring-projects/spring-data-mongodb

@Override
public Document toDocument() {
  Document doc = new Document(super.toDocument());
  if (multipleOf != null) {
    doc.append("multipleOf", multipleOf);
  }
  if (range != null) {
    if (range.getLowerBound().isBounded()) {
      range.getLowerBound().getValue().ifPresent(it -> doc.append("minimum", it));
      if (!range.getLowerBound().isInclusive()) {
        doc.append("exclusiveMinimum", true);
      }
    }
    if (range.getUpperBound().isBounded()) {
      range.getUpperBound().getValue().ifPresent(it -> doc.append("maximum", it));
      if (!range.getUpperBound().isInclusive()) {
        doc.append("exclusiveMaximum", true);
      }
    }
  }
  return doc;
}
origin: spring-projects/spring-data-redis

  RedisClusterAsyncCommands<byte[], byte[]> connection = getAsyncConnection();
  if (range.getLowerBound().isBounded()) {
    if (range.getUpperBound().isBounded()) {
      futureResult = connection.bitpos(key, bit, getLowerValue(range), getUpperValue(range));
    } else {
if (range.getLowerBound().isBounded()) {
  if (range.getUpperBound().isBounded()) {
    return getConnection().bitpos(key, bit, getLowerValue(range), getUpperValue(range));
origin: org.springframework.data/spring-data-mongodb

@Override
public Document toDocument() {
  Document doc = new Document(super.toDocument());
  if (multipleOf != null) {
    doc.append("multipleOf", multipleOf);
  }
  if (range != null) {
    if (range.getLowerBound().isBounded()) {
      range.getLowerBound().getValue().ifPresent(it -> doc.append("minimum", it));
      if (!range.getLowerBound().isInclusive()) {
        doc.append("exclusiveMinimum", true);
      }
    }
    if (range.getUpperBound().isBounded()) {
      range.getUpperBound().getValue().ifPresent(it -> doc.append("maximum", it));
      if (!range.getUpperBound().isInclusive()) {
        doc.append("exclusiveMaximum", true);
      }
    }
  }
  return doc;
}
origin: org.springframework.data/spring-data-redis

@Override
public Long bitPos(byte[] key, boolean bit, Range<Long> range) {
  Assert.notNull(key, "Key must not be null!");
  Assert.notNull(range, "Range must not be null! Use Range.unbounded() instead.");
  List<byte[]> args = new ArrayList<>(3);
  args.add(LettuceConverters.toBit(bit));
  if (range.getLowerBound().isBounded()) {
    args.add(range.getLowerBound().getValue().map(LettuceConverters::toBytes).get());
  }
  if (range.getUpperBound().isBounded()) {
    args.add(range.getUpperBound().getValue().map(LettuceConverters::toBytes).get());
  }
  return Long.class.cast(connection.execute("BITPOS", key, args));
}
origin: apache/servicemix-bundles

@Override
public Flux<NumericResponse<BitPosCommand, Long>> bitPos(Publisher<BitPosCommand> commands) {
  return connection.execute(cmd -> {
    return Flux.from(commands).flatMap(command -> {
      Mono<Long> result;
      Range<Long> range = command.getRange();
      if (range.getLowerBound().isBounded()) {
        result = cmd.bitpos(command.getKey(), command.getBit(), getLowerValue(range));
        if (range.getUpperBound().isBounded()) {
          result = cmd.bitpos(command.getKey(), command.getBit(), getLowerValue(range), getUpperValue(range));
        }
      } else {
        result = cmd.bitpos(command.getKey(), command.getBit());
      }
      return result.map(respValue -> new NumericResponse<>(command, respValue));
    });
  });
}
origin: org.springframework.data/spring-data-redis

@Override
public Flux<NumericResponse<BitPosCommand, Long>> bitPos(Publisher<BitPosCommand> commands) {
  return connection.execute(cmd -> {
    return Flux.from(commands).flatMap(command -> {
      Mono<Long> result;
      Range<Long> range = command.getRange();
      if (range.getLowerBound().isBounded()) {
        result = cmd.bitpos(command.getKey(), command.getBit(), getLowerValue(range));
        if (range.getUpperBound().isBounded()) {
          result = cmd.bitpos(command.getKey(), command.getBit(), getLowerValue(range), getUpperValue(range));
        }
      } else {
        result = cmd.bitpos(command.getKey(), command.getBit());
      }
      return result.map(respValue -> new NumericResponse<>(command, respValue));
    });
  });
}
origin: apache/servicemix-bundles

@Nullable
@Override
public Long bitPos(byte[] key, boolean bit, Range<Long> range) {
  Assert.notNull(key, "Key must not be null!");
  Assert.notNull(range, "Range must not be null! Use Range.unbounded() instead.");
  BitPosParams params = null;
  if (range.getLowerBound().isBounded()) {
    params = range.getUpperBound().isBounded()
        ? new BitPosParams(range.getLowerBound().getValue().get(), range.getUpperBound().getValue().get())
        : new BitPosParams(range.getLowerBound().getValue().get());
  }
  try {
    if (isPipelined()) {
      pipeline(connection.newJedisResult(params != null ? connection.getRequiredPipeline().bitpos(key, bit, params)
          : connection.getRequiredPipeline().bitpos(key, bit)));
      return null;
    }
    if (isQueueing()) {
      transaction(
          connection.newJedisResult(params != null ? connection.getRequiredTransaction().bitpos(key, bit, params)
              : connection.getRequiredTransaction().bitpos(key, bit)));
      return null;
    }
    return params != null ? connection.getJedis().bitpos(key, bit, params) : connection.getJedis().bitpos(key, bit);
  } catch (Exception ex) {
    throw convertJedisAccessException(ex);
  }
}
origin: org.springframework.data/spring-data-redis

@Nullable
@Override
public Long bitPos(byte[] key, boolean bit, Range<Long> range) {
  Assert.notNull(key, "Key must not be null!");
  Assert.notNull(range, "Range must not be null! Use Range.unbounded() instead.");
  BitPosParams params = null;
  if (range.getLowerBound().isBounded()) {
    params = range.getUpperBound().isBounded()
        ? new BitPosParams(range.getLowerBound().getValue().get(), range.getUpperBound().getValue().get())
        : new BitPosParams(range.getLowerBound().getValue().get());
  }
  try {
    if (isPipelined()) {
      pipeline(connection.newJedisResult(params != null ? connection.getRequiredPipeline().bitpos(key, bit, params)
          : connection.getRequiredPipeline().bitpos(key, bit)));
      return null;
    }
    if (isQueueing()) {
      transaction(
          connection.newJedisResult(params != null ? connection.getRequiredTransaction().bitpos(key, bit, params)
              : connection.getRequiredTransaction().bitpos(key, bit)));
      return null;
    }
    return params != null ? connection.getJedis().bitpos(key, bit, params) : connection.getJedis().bitpos(key, bit);
  } catch (Exception ex) {
    throw convertJedisAccessException(ex);
  }
}
origin: org.springframework.data/spring-data-redis

  RedisClusterAsyncCommands<byte[], byte[]> connection = getAsyncConnection();
  if (range.getLowerBound().isBounded()) {
    if (range.getUpperBound().isBounded()) {
      futureResult = connection.bitpos(key, bit, getLowerValue(range), getUpperValue(range));
    } else {
if (range.getLowerBound().isBounded()) {
  if (range.getUpperBound().isBounded()) {
    return getConnection().bitpos(key, bit, getLowerValue(range), getUpperValue(range));
origin: spring-projects/spring-data-redis

@Override
public Flux<NumericResponse<BitPosCommand, Long>> bitPos(Publisher<BitPosCommand> commands) {
  return connection.execute(cmd -> {
    return Flux.from(commands).flatMap(command -> {
      Mono<Long> result;
      Range<Long> range = command.getRange();
      if (range.getLowerBound().isBounded()) {
        result = cmd.bitpos(command.getKey(), command.getBit(), getLowerValue(range));
        if (range.getUpperBound().isBounded()) {
          result = cmd.bitpos(command.getKey(), command.getBit(), getLowerValue(range), getUpperValue(range));
        }
      } else {
        result = cmd.bitpos(command.getKey(), command.getBit());
      }
      return result.map(respValue -> new NumericResponse<>(command, respValue));
    });
  });
}
origin: apache/servicemix-bundles

  RedisClusterAsyncCommands<byte[], byte[]> connection = getAsyncConnection();
  if (range.getLowerBound().isBounded()) {
    if (range.getUpperBound().isBounded()) {
      futureResult = connection.bitpos(key, bit, getLowerValue(range), getUpperValue(range));
    } else {
if (range.getLowerBound().isBounded()) {
  if (range.getUpperBound().isBounded()) {
    return getConnection().bitpos(key, bit, getLowerValue(range), getUpperValue(range));
origin: apache/servicemix-bundles

@Override
public Long bitPos(byte[] key, boolean bit, Range<Long> range) {
  Assert.notNull(key, "Key must not be null!");
  Assert.notNull(range, "Range must not be null! Use Range.unbounded() instead.");
  List<byte[]> args = new ArrayList<>(3);
  args.add(LettuceConverters.toBit(bit));
  if (range.getLowerBound().isBounded()) {
    args.add(range.getLowerBound().getValue().map(LettuceConverters::toBytes).get());
  }
  if (range.getUpperBound().isBounded()) {
    args.add(range.getUpperBound().getValue().map(LettuceConverters::toBytes).get());
  }
  return Long.class.cast(connection.execute("BITPOS", key, args));
}
org.springframework.data.domainRange$BoundisBounded

Javadoc

Returns whether this boundary is bounded.

Popular methods of Range$Bound

  • getValue
  • inclusive
  • isInclusive
  • exclusive
  • unbounded
  • <init>
  • toPrefixString
  • toSuffixString

Popular in Java

  • Creating JSON documents from java classes using gson
  • setScale (BigDecimal)
  • getExternalFilesDir (Context)
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • GridLayout (java.awt)
    The GridLayout class is a layout manager that lays out a container's components in a rectangular gri
  • BufferedWriter (java.io)
    Wraps an existing Writer and buffers the output. Expensive interaction with the underlying reader is
  • DecimalFormat (java.text)
    DecimalFormat is a concrete subclass ofNumberFormat that formats decimal numbers. It has a variety o
  • Calendar (java.util)
    Calendar is an abstract base class for converting between a Date object and a set of integer fields
  • LinkedHashMap (java.util)
    Hash table and linked list implementation of the Map interface, with predictable iteration order. Th
  • Stream (java.util.stream)
    A sequence of elements supporting sequential and parallel aggregate operations. The following exampl
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now