com.bc.ceres.core.Assert.argument()方法的使用及代码示例

x33g5p2x  于2022-01-16 转载在 其他  
字(7.3k)|赞(0)|评价(0)|浏览(139)

本文整理了Java中com.bc.ceres.core.Assert.argument()方法的一些代码示例,展示了Assert.argument()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Assert.argument()方法的具体详情如下:
包路径:com.bc.ceres.core.Assert
类名称:Assert
方法名:argument

Assert.argument介绍

暂无

代码示例

代码示例来源:origin: bcdev/beam

public ResolutionLevel(int index, double scale) {
  Assert.argument(index >= 0, "index >= 0");
  Assert.argument(scale >= 1.0, "scale >= 1.0");
  this.index = index;
  this.scale = scale;
}

代码示例来源:origin: bcdev/beam

public TransectProfileDataBuilder raster(RasterDataNode raster) {
  Assert.argument(raster.getProduct() != null, "raster.getProduct() != null");
  config.raster = raster;
  return this;
}

代码示例来源:origin: senbox-org/snap-desktop

public DefaultImageInfoEditorModel(ImageInfo imageInfo) {
  super(imageInfo);
  Assert.argument(imageInfo.getColorPaletteDef() != null, "imageInfo");
}

代码示例来源:origin: bcdev/beam

public static boolean isVariableNameValid(String name) {
  Assert.argument(StringUtils.isNotNullAndNotEmpty(name), "name");
  // copied from nujan sources edu.ucar.ral.nujan.netcdf.NhGroup.checkName()
  return Pattern.matches("^[_a-zA-Z][-_: a-zA-Z0-9]*$", name);
}

代码示例来源:origin: bcdev/beam

public void setPoints(Point[] points) {
  Assert.notNull(points);
  Assert.argument(points.length >= 2, "points.length >= 2");
  this.points.clear();
  this.points.addAll(Arrays.asList(points));
}

代码示例来源:origin: bcdev/beam

private void setAuxdataInstallDir(String auxdataDirPropertyName, File defaultAuxdataInstallDir) {
  Assert.argument(StringUtils.isNotNullAndNotEmpty(auxdataDirPropertyName), "auxdataDirPropertyName is not null and not empty");
  String auxdataDirPath = System.getProperty(auxdataDirPropertyName, defaultAuxdataInstallDir.getAbsolutePath());
  auxdataInstallDir = new File(auxdataDirPath);
}

代码示例来源:origin: senbox-org/snap-desktop

void addSpectrum(double... spectrum) {
  Assert.argument(spectrum.length == bandNames.size(), "spectrum size does not match # selected bands");
  if (pickMode == PickMode.SINGLE) {
    plusSpectra.clear();
    minusSpectra.clear();
    plusSpectra.add(spectrum);
  } else if (pickMode == PickMode.PLUS) {
    plusSpectra.add(spectrum);
  } else if (pickMode == PickMode.MINUS) {
    minusSpectra.add(spectrum);
  }
  fireModelChanged(true);
}

代码示例来源:origin: bcdev/beam

public static String createLabel(PlacemarkDescriptor placemarkDescriptor, int pinNumber, boolean firstLetterIsUpperCase) {
  Assert.argument(placemarkDescriptor.getRoleLabel().length() > 0, "placemarkDescriptor.getRoleLabel()");
  String name = placemarkDescriptor.getRoleLabel();
  if (firstLetterIsUpperCase) {
    name = name.substring(0, 1).toUpperCase() + name.substring(1);
  }
  return name + " " + pinNumber;
}

代码示例来源:origin: bcdev/beam

FileBackedSpatialBinCollector(long maximumNumberOfBins) throws IOException {
  Assert.argument(maximumNumberOfBins > 0, "maximumNumberOfBins > 0");
  numBinsPerFile = getNumBinsPerFile(maximumNumberOfBins);
  tempDir = VirtualDir.createUniqueTempDir();
  Runtime.getRuntime().addShutdownHook(new DeleteDirThread(tempDir));
  binList = new ArrayList<>();
  consumingCompleted = new AtomicBoolean(false);
  currentFileIndex = 0;
  numBinsComsumed = 0;
}

代码示例来源:origin: senbox-org/snap-desktop

ImageInfoEditorModel3B(ImageInfo imageInfo, int channel) {
  super(imageInfo);
  Assert.argument(imageInfo.getRgbChannelDef() != null, "imageInfo");
  this.channel = channel;
  updateGammaCurve();
}

代码示例来源:origin: bcdev/beam

ImageInfoEditorModel3B(ImageInfo imageInfo, int channel) {
  super(imageInfo);
  Assert.argument(imageInfo.getRgbChannelDef() != null, "imageInfo");
  this.channel = channel;
  updateGammaCurve();
}

代码示例来源:origin: bcdev/beam

/**
 * Sets the SPI which was used to create this operator.
 *
 * @param operatorSpi The operator SPI.
 */
public final void setSpi(OperatorSpi operatorSpi) {
  Assert.notNull(operatorSpi, "operatorSpi");
  Assert.argument(operatorSpi.getOperatorClass().isAssignableFrom(getClass()), "operatorSpi");
  context.setOperatorSpi(operatorSpi);
}

代码示例来源:origin: senbox-org/snap-desktop

private static void ensureExistingProperty(BindingContext bindingContext, String propertyName) {
  Assert.argument(bindingContext.getPropertySet().getProperty(propertyName) != null,
          "bindingContext must contain a property named " + propertyName);
}

代码示例来源:origin: senbox-org/snap-desktop

private static ProductLibraryActionExtDescriptor createDescriptor(FileObject fileObject) {
    final String id = fileObject.getName();
    final Integer position = (Integer) fileObject.getAttribute("position");

    Assert.argument(position != null, "Attribute 'position' must be provided");

    if(id.equals("Separator")) {
      return new ProductLibraryActionExtDescriptor(id, null, position);
    }

    final Class<? extends ProductLibraryActionExt> actionExtClass =
        OperatorUIRegistry.getClassAttribute(fileObject, "actionExtClass", ProductLibraryActionExt.class, false);

    Assert.argument(actionExtClass != null, "Attribute 'actionExtClass' must be provided");

    return new ProductLibraryActionExtDescriptor(id, actionExtClass, position);
  }
}

代码示例来源:origin: bcdev/beam

public DimKey(Dimension... dims) {
  Assert.argument(dims.length >= 1, "dims.length >= 1");
  for (Dimension dim : dims) {
    Assert.notNull(dim, "dim");
  }
  this.dims = dims;
  xDimIndex = findXDimensionIndex();
  yDimIndex = findYDimensionIndex();
}

代码示例来源:origin: bcdev/beam

protected TC createConfig(String typeName) {
  Assert.notNull(typeName, "typeName");
  TypedDescriptor<TC> descriptor = TypedDescriptorsRegistry.getInstance().getDescriptor(descriptorClass, typeName);
  Assert.argument(descriptor != null, String.format("Unknown type name '%s'", typeName));
  return descriptor.createConfig();
}

代码示例来源:origin: bcdev/beam

public void setXYValues(double[] xValues, double[] yValues) {
  Assert.notNull(xValues, "xValues");
  Assert.notNull(yValues, "yValues");
  Assert.argument(xValues.length > 1, "xValues.length > 1");
  Assert.argument(xValues.length == yValues.length, "xValues.length == yValues.length");
  if (!ObjectUtils.equalObjects(this.xValues,  xValues) || !ObjectUtils.equalObjects(this.yValues,  yValues)) {
    this.xValues = xValues;
    this.yValues = yValues;
    this.xRange = Range.computeRangeDouble(xValues, IndexValidator.TRUE, null, ProgressMonitor.NULL);
    this.yRange = Range.computeRangeDouble(yValues, IndexValidator.TRUE, null, ProgressMonitor.NULL);
    invalidate();
  }
}

代码示例来源:origin: senbox-org/snap-desktop

@Override
public void bindComponents() {
  String propertyName = getBinding().getPropertyName();
  Property property = getBinding().getContext().getPropertySet().getProperty(propertyName);
  Assert.argument(property.getType().equals(String[].class), "property '" + propertyName +"' must be of type String[].class");
  listModel.setProperty(property);
}

代码示例来源:origin: bcdev/beam

@Override
public void bindComponents() {
  String propertyName = getBinding().getPropertyName();
  Property property = getBinding().getContext().getPropertySet().getProperty(propertyName);
  Assert.argument(property.getType().equals(String[].class), "property '" + propertyName +"' must be of type String[].class");
  listModel.setProperty(property);
}

代码示例来源:origin: bcdev/beam

@Override
public synchronized void setRawSamples(ProductData rawSamples) {
  if (target) {
    if (rawSamples != this.dataBuffer) {
      Assert.notNull(rawSamples, "rawSamples");
      Assert.argument(rawSamples.getType() == dataBuffer.getType(), "rawSamples.getType() == dataBuffer.getType()");
      Assert.argument(rawSamples.getNumElems() == dataBuffer.getNumElems(), "rawSamples.getNumElems() == dataBuffer.getNumElems()");
      dataBuffer.setElems(rawSamples.getElems());
    }
  }
}

相关文章