Tabnine Logo
Range$Bound.inclusive
Code IndexAdd Tabnine to your IDE (free)

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

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

origin: spring-projects/spring-data-mongodb

private static Bound<?> createBound(Number number, boolean inclusive) {
  if (number instanceof Long) {
    return inclusive ? Bound.inclusive((Long) number) : Bound.exclusive((Long) number);
  }
  if (number instanceof Double) {
    return inclusive ? Bound.inclusive((Double) number) : Bound.exclusive((Double) number);
  }
  if (number instanceof Float) {
    return inclusive ? Bound.inclusive((Float) number) : Bound.exclusive((Float) number);
  }
  if (number instanceof Integer) {
    return inclusive ? Bound.inclusive((Integer) number) : Bound.exclusive((Integer) number);
  }
  if (number instanceof BigDecimal) {
    return inclusive ? Bound.inclusive((BigDecimal) number) : Bound.exclusive((BigDecimal) number);
  }
  throw new IllegalArgumentException("Unsupported numeric value.");
}
origin: org.springframework.data/spring-data-mongodb

private static Bound<?> createBound(Number number, boolean inclusive) {
  if (number instanceof Long) {
    return inclusive ? Bound.inclusive((Long) number) : Bound.exclusive((Long) number);
  }
  if (number instanceof Double) {
    return inclusive ? Bound.inclusive((Double) number) : Bound.exclusive((Double) number);
  }
  if (number instanceof Float) {
    return inclusive ? Bound.inclusive((Float) number) : Bound.exclusive((Float) number);
  }
  if (number instanceof Integer) {
    return inclusive ? Bound.inclusive((Integer) number) : Bound.exclusive((Integer) number);
  }
  if (number instanceof BigDecimal) {
    return inclusive ? Bound.inclusive((BigDecimal) number) : Bound.exclusive((BigDecimal) number);
  }
  throw new IllegalArgumentException("Unsupported numeric value.");
}
origin: org.springframework.data/spring-data-redis

/**
 * Applies an upper bound to the {@link Range}. Constructs a new command instance with all previously configured
 * properties.
 *
 * @param end
 * @return a new {@link RangeCommand} with the upper bound applied.
 */
public RangeCommand toIndex(long end) {
  return new RangeCommand(getKey(), Range.of(range.getLowerBound(), Bound.inclusive(end)));
}
origin: org.springframework.data/spring-data-redis

/**
 * Applies a lower bound to the {@link Range}. Constructs a new command instance with all previously configured
 * properties.
 *
 * @param start
 * @return a new {@link RangeCommand} with the lower bound applied.
 */
public RangeCommand fromIndex(long start) {
  return new RangeCommand(getKey(), Range.of(Bound.inclusive(start), range.getUpperBound()));
}
origin: org.springframework.data/spring-data-mongodb

/**
 * Define the {@literal maxItems}.
 *
 * @param count the allowed maximal number of array items.
 * @return new instance of {@link ArrayJsonSchemaObject}.
 */
public ArrayJsonSchemaObject maxItems(int count) {
  Bound<Integer> lower = this.range != null ? this.range.getLowerBound() : Bound.unbounded();
  return range(Range.of(lower, Bound.inclusive(count)));
}
origin: org.springframework.data/spring-data-mongodb

/**
 * Define the valid length range ({@literal maxLength}) for a valid field.
 *
 * @param length
 * @return new instance of {@link StringJsonSchemaObject}.
 */
public StringJsonSchemaObject maxLength(int length) {
  Bound<Integer> lower = this.length != null ? this.length.getLowerBound() : Bound.unbounded();
  return length(Range.of(lower, Bound.inclusive(length)));
}
origin: org.springframework.data/spring-data-mongodb

/**
 * Define the {@literal minProperties}.
 *
 * @param count the allowed minimal number of properties.
 * @return new instance of {@link ObjectJsonSchemaObject}.
 */
public ObjectJsonSchemaObject minProperties(int count) {
  Bound<Integer> upper = this.propertiesCount != null ? this.propertiesCount.getUpperBound() : Bound.unbounded();
  return propertiesCount(Range.of(Bound.inclusive(count), upper));
}
origin: org.springframework.data/spring-data-mongodb

public Range<Distance> getDistanceRange() {
  MongoParameters mongoParameters = method.getParameters();
  int rangeIndex = mongoParameters.getRangeIndex();
  if (rangeIndex != -1) {
    return getValue(rangeIndex);
  }
  int maxDistanceIndex = mongoParameters.getMaxDistanceIndex();
  Bound<Distance> maxDistance = maxDistanceIndex == -1 ? Bound.unbounded() : Bound.inclusive((Distance) getValue(maxDistanceIndex));
  return Range.of(Bound.unbounded(), maxDistance);
}
origin: org.springframework.data/spring-data-mongodb

/**
 * Define the valid length range ({@literal minLength}) for a valid field.
 *
 * @param length
 * @return new instance of {@link StringJsonSchemaObject}.
 */
public StringJsonSchemaObject minLength(int length) {
  Bound<Integer> upper = this.length != null ? this.length.getUpperBound() : Bound.unbounded();
  return length(Range.of(Bound.inclusive(length), upper));
}
origin: org.springframework.data/spring-data-mongodb

/**
 * Define the {@literal maxProperties}.
 *
 * @param count the allowed maximum number of properties.
 * @return new instance of {@link ObjectJsonSchemaObject}.
 */
public ObjectJsonSchemaObject maxProperties(int count) {
  Bound<Integer> lower = this.propertiesCount != null ? this.propertiesCount.getLowerBound() : Bound.unbounded();
  return propertiesCount(Range.of(lower, Bound.inclusive(count)));
}
origin: org.springframework.data/spring-data-mongodb

/**
 * Define the {@literal maxItems}.
 *
 * @param count the allowed minimal number of array items.
 * @return new instance of {@link ArrayJsonSchemaObject}.
 */
public ArrayJsonSchemaObject minItems(int count) {
  Bound<Integer> upper = this.range != null ? this.range.getUpperBound() : Bound.unbounded();
  return range(Range.of(Bound.inclusive(count), upper));
}
origin: spring-projects/spring-data-mongodb

/**
 * Define the {@literal maxItems}.
 *
 * @param count the allowed maximal number of array items.
 * @return new instance of {@link ArrayJsonSchemaObject}.
 */
public ArrayJsonSchemaObject maxItems(int count) {
  Bound<Integer> lower = this.range != null ? this.range.getLowerBound() : Bound.unbounded();
  return range(Range.of(lower, Bound.inclusive(count)));
}
origin: spring-projects/spring-data-mongodb

/**
 * Define the {@literal maxProperties}.
 *
 * @param count the allowed maximum number of properties.
 * @return new instance of {@link ObjectJsonSchemaObject}.
 */
public ObjectJsonSchemaObject maxProperties(int count) {
  Bound<Integer> lower = this.propertiesCount != null ? this.propertiesCount.getLowerBound() : Bound.unbounded();
  return propertiesCount(Range.of(lower, Bound.inclusive(count)));
}
origin: spring-projects/spring-data-redis

/**
 * Applies an upper bound to the {@link Range}. Constructs a new command instance with all previously configured
 * properties.
 *
 * @param end
 * @return a new {@link RangeCommand} with the upper bound applied.
 */
public RangeCommand toIndex(long end) {
  return new RangeCommand(getKey(), Range.of(range.getLowerBound(), Bound.inclusive(end)));
}
origin: spring-projects/spring-data-mongodb

/**
 * Define the valid length range ({@literal minLength}) for a valid field.
 *
 * @param length
 * @return new instance of {@link StringJsonSchemaObject}.
 */
public StringJsonSchemaObject minLength(int length) {
  Bound<Integer> upper = this.length != null ? this.length.getUpperBound() : Bound.unbounded();
  return length(Range.of(Bound.inclusive(length), upper));
}
origin: spring-projects/spring-data-redis

/**
 * Applies a lower bound to the {@link Range}. Constructs a new command instance with all previously configured
 * properties.
 *
 * @param start
 * @return a new {@link RangeCommand} with the lower bound applied.
 */
public RangeCommand fromIndex(long start) {
  return new RangeCommand(getKey(), Range.of(Bound.inclusive(start), range.getUpperBound()));
}
origin: spring-projects/spring-data-mongodb

public Range<Distance> getDistanceRange() {
  MongoParameters mongoParameters = method.getParameters();
  int rangeIndex = mongoParameters.getRangeIndex();
  if (rangeIndex != -1) {
    return getValue(rangeIndex);
  }
  int maxDistanceIndex = mongoParameters.getMaxDistanceIndex();
  Bound<Distance> maxDistance = maxDistanceIndex == -1 ? Bound.unbounded() : Bound.inclusive((Distance) getValue(maxDistanceIndex));
  return Range.of(Bound.unbounded(), maxDistance);
}
origin: spring-projects/spring-data-mongodb

/**
 * Define the {@literal maxItems}.
 *
 * @param count the allowed minimal number of array items.
 * @return new instance of {@link ArrayJsonSchemaObject}.
 */
public ArrayJsonSchemaObject minItems(int count) {
  Bound<Integer> upper = this.range != null ? this.range.getUpperBound() : Bound.unbounded();
  return range(Range.of(Bound.inclusive(count), upper));
}
origin: spring-projects/spring-data-mongodb

/**
 * Define the valid length range ({@literal maxLength}) for a valid field.
 *
 * @param length
 * @return new instance of {@link StringJsonSchemaObject}.
 */
public StringJsonSchemaObject maxLength(int length) {
  Bound<Integer> lower = this.length != null ? this.length.getLowerBound() : Bound.unbounded();
  return length(Range.of(lower, Bound.inclusive(length)));
}
origin: spring-projects/spring-data-mongodb

/**
 * Define the {@literal minProperties}.
 *
 * @param count the allowed minimal number of properties.
 * @return new instance of {@link ObjectJsonSchemaObject}.
 */
public ObjectJsonSchemaObject minProperties(int count) {
  Bound<Integer> upper = this.propertiesCount != null ? this.propertiesCount.getUpperBound() : Bound.unbounded();
  return propertiesCount(Range.of(Bound.inclusive(count), upper));
}
org.springframework.data.domainRange$Boundinclusive

Javadoc

Creates a boundary including value.

Popular methods of Range$Bound

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

Popular in Java

  • Making http post requests using okhttp
  • scheduleAtFixedRate (ScheduledExecutorService)
  • findViewById (Activity)
  • requestLocationUpdates (LocationManager)
  • EOFException (java.io)
    Thrown when a program encounters the end of a file or stream during an input operation.
  • BigDecimal (java.math)
    An immutable arbitrary-precision signed decimal.A value is represented by an arbitrary-precision "un
  • Properties (java.util)
    A Properties object is a Hashtable where the keys and values must be Strings. Each property can have
  • UUID (java.util)
    UUID is an immutable representation of a 128-bit universally unique identifier (UUID). There are mul
  • Executors (java.util.concurrent)
    Factory and utility methods for Executor, ExecutorService, ScheduledExecutorService, ThreadFactory,
  • Get (org.apache.hadoop.hbase.client)
    Used to perform Get operations on a single row. To get everything for a row, instantiate a Get objec
  • CodeWhisperer alternatives
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