Filters a list of temporal propositions by time.

@param params
a <code>List</code> of propositions.
@param minValid
@param maxValid
@return
548371
public static <T extends TemporalProposition> List<T> getView(
            List<T> params, Long minValid, Long maxValid) {
        if (params != null) {
            if (minValid == null && maxValid == null) {
                return params;
            } else {
                int min = minValid != null ? binarySearchMinStart(params,
                        minValid.longValue()) : 0;
                int max = maxValid != null ? binarySearchMaxFinish(params,
                        maxValid.longValue()) : params.size();
                return params.subList(min, max);
            }
        } else {
            return null;
        }
    }
101125
public void filterUpdate(String columnId, int row, Integer maxSelections) {
        if (displayerSettings.isFilterEnabled()) {

            List<Interval> selectedIntervals = columnSelectionMap.get(columnId);
            Interval intervalFiltered = filterInterval(columnId, row);

            // Existing interval reset
            if (intervalFiltered != null) {
                selectedIntervals.remove(intervalFiltered);
                if (!selectedIntervals.isEmpty()) {
                    filterApply(columnId, selectedIntervals);
                }
                else {
                    filterReset(columnId);
                }
            }
            // No current filter => Add the selected interval
            else if (selectedIntervals == null) {
                Interval intervalSelected = dataSetHandler.getInterval(columnId, row);
                if (intervalSelected != null) {
                    selectedIntervals = new ArrayList<>();
                    selectedIntervals.add(intervalSelected);
                    columnSelectionMap.put(columnId, selectedIntervals);
                    filterApply(columnId, selectedIntervals);
                }
            }
            // Extra interval added to an already filtered column
            else {
                Interval intervalSelected = dataSetHandler.getInterval(columnId, row);
                if (intervalSelected != null) {
                    if (displayerSettings.isFilterSelfApplyEnabled()) {
                        selectedIntervals = new ArrayList<>();
                        columnSelectionMap.put(columnId, selectedIntervals);
                    }
                    selectedIntervals.add(intervalSelected);
                    if (maxSelections != null && maxSelections > 0 && selectedIntervals.size() >= maxSelections) {
                        filterReset(columnId);
                    } else {
                        filterApply(columnId, selectedIntervals);
                    }
                }
            }
        }
    }
501734
@Override
	public String getParagraphs(int min, int max) {
		int count = getCount(min, max);
		StringBuilder sb = new StringBuilder();
		for (int j = 0; j < count; j++) {
			int sentences = random.nextInt(5) + 2; // 2 to 6
			for (int i = 0; i < sentences; i++) {
				String first = getWords(1, 1, false);
				first = first.substring(0, 1).toUpperCase()
						+ first.substring(1);
				sb.append(first);

				sb.append(getWords(2, 20, false));
				sb.append(".  ");
			}
			sb.append("\n");
		}
		return sb.toString().trim();
	}
478840
public static Integer validateInteger(final String context,
			final String input, final int minValue, final int maxValue,
			final boolean allowNull) throws ValidationException {
		return validator.getValidInteger(context, input, minValue, maxValue,
				allowNull);
	}
133175
private boolean validatePast(Object validationObject, Annotation annotate)
    {
        if (checkNullObject(validationObject))
        {
            return true;
        }

        int res = 0;

        if (validationObject.getClass().isAssignableFrom(java.util.Date.class))
        {
            Date today = new Date();
            Date pastDate = (Date) validationObject;

            res = pastDate.compareTo(today);
        }
        else if (validationObject.getClass().isAssignableFrom(java.util.Calendar.class))
        {

            Calendar cal = Calendar.getInstance();
            Calendar pastDate = (Calendar) validationObject;
            res = pastDate.compareTo(cal);

        }
        // else
        // {
        // ruleExceptionHandler(((Past) annotate).message());
        // }
        if (res >= 0)
        {
            throwValidationException(((Past) annotate).message());
        }

        return true;
    }
564487
public static void checkMinMax(int min, int max) {
    checkMin(min);
    checkMax(max);
    checkArgument(min <= max, "min > max");
  }
648684
public Query withParams(Collection<Object> paramValues) {
        if (null == paramValues) {
            return this;
        }
        int i = 0;
        for (Object paramValue : paramValues) {
            paramIndexValues.put(++i, this.converterValue(paramValue));
        }
        return this;
    }
938910
public List<Object> getClauseValue(Parameter param) {
        Parameter match = null;
        if (typedParameter != null && typedParameter.jpaParameters != null) {
            for (Parameter p : typedParameter.jpaParameters) {
                if (p.equals(param)) {
                    match = p;
                    if (typedParameter.getType().equals(Type.NAMED)) {
                        List<FilterClause> clauses = typedParameter.getParameters().get(":" + p.getName());
                        if (clauses != null) {
                            return clauses.get(0).getValue();
                        }
                    } else {
                        List<FilterClause> clauses = typedParameter.getParameters().get("?" + p.getPosition());
                        if (clauses != null) {
                            return clauses.get(0).getValue();
                        } else {
                            UpdateClause updateClause = typedParameter.getUpdateParameters().get("?" + p.getPosition());
                            if (updateClause != null) {
                                List<Object> value = new ArrayList<Object>();
                                value.add(updateClause.getValue());
                                return value;
                            }

                        }
                    }
                    break;
                }
            }
            if (match == null) {
                throw new IllegalArgumentException("parameter is not a parameter of the query");
            }
        }

        logger.error("parameter{} is not a parameter of the query", param);
        throw new IllegalArgumentException("parameter is not a parameter of the query");
    }
466689
static Map<String, Object> maxPayload(final Object max) {
		if (max == null) {
			return null;
		}
		Map<String, Object> payload = new LinkedHashMap<>();
		payload.put("value", max);
		payload.put("message", MSG_PREFIX + VALIDATORS.get(Max.class));
		return payload;
	}
58643
def _validate_max(self, proposal):
        """"""
        max = proposal['value']
        if max < self.min:
            raise TraitError('setting max < min')
        if max < self.value:
            self.value = max
        return max
612056
public boolean matchesFilter(String filter, int param) {

        filter = filter.toLowerCase();
        return m_parameters[param].toLowerCase().contains(filter);
    }
358009
public List<ValidationData> getValidationDatas(ParamType paramType, String key) {
        if (this.urlMap == null || this.validationDataRuleListMap == null) {
            log.info("url map is empty :: " + key );
            return null;
        }

        if (key == null || paramType == null) {
            throw new ValidationLibException("any parameter is null", HttpStatus.INTERNAL_SERVER_ERROR);
        }

        ReqUrl reqUrl = urlMap.get(key);
        if (reqUrl == null) {
            log.info("reqUrl is null :" + key);
            return null;
        }

        return validationDataRuleListMap.get(paramType.getUniqueKey(reqUrl.getUniqueKey()));
    }
727458
static Map<String, Object> sizePayload(final Object min, final Object max) {
		if (min == null || max == null) {
			return null;
		}
		Map<String, Object> payload = new LinkedHashMap<>();
		payload.put("min", min);
		payload.put("max", max);
		payload.put("message", MSG_PREFIX + VALIDATORS.get(Size.class));
		return payload;
	}
388328
public static void validateBetween(Number value, Number min, Number max, String errorMsg) throws ValidateException {
		if (false == isBetween(value, min, max)) {
			throw new ValidateException(errorMsg);
		}
	}
82348
public Date getDate(final Date min, final Date max) {
		return getDate(min.getTime(), max.getTime());
	}
885028
private static void checkPreconditions(final long min, final long max) {
		if( max < min ) {
			throw new IllegalArgumentException(String.format("max (%d) should not be < min (%d)", max, min));
		}
	}
534204
BlockCommand getInvalidateBlocks(int maxblocks) {
    Block[] deleteList = null;
    synchronized (invalidateBlocks) {
      deleteList = invalidateBlocks.pollToArray(new Block[Math.min(
          invalidateBlocks.size(), maxblocks)]);
    }
    return (deleteList == null || deleteList.length == 0) ? 
        null: new BlockCommand(DatanodeProtocol.DNA_INVALIDATE, deleteList);
  }