Tabnine Logo
Range$Bound.isBounded
Code IndexAdd Tabnine 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)

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: 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: 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: 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: 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

@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

@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

@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: 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: 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: 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: 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));
    });
  });
}
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

  • Parsing JSON documents to java classes using gson
  • scheduleAtFixedRate (Timer)
  • scheduleAtFixedRate (ScheduledExecutorService)
  • addToBackStack (FragmentTransaction)
  • MalformedURLException (java.net)
    This exception is thrown when a program attempts to create an URL from an incorrect specification.
  • SQLException (java.sql)
    An exception that indicates a failed JDBC operation. It provides the following information about pro
  • Date (java.util)
    A specific moment in time, with millisecond precision. Values typically come from System#currentTime
  • HashMap (java.util)
    HashMap is an implementation of Map. All optional operations are supported.All elements are permitte
  • Hashtable (java.util)
    A plug-in replacement for JDK1.5 java.util.Hashtable. This version is based on org.cliffc.high_scale
  • Runner (org.openjdk.jmh.runner)
  • Top PhpStorm plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now