com.bc.ceres.core.Assert类的使用及代码示例

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

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

Assert介绍

暂无

代码示例

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

public UndoableDisplacementBandsCreation(Product product, Band[] displacementBands) {
  Assert.notNull(product, "product");
  Assert.notNull(displacementBands, "displacementBands");
  this.product = product;
  this.displacementBands = displacementBands;
}

代码示例来源: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

@Override
public final void setDescriptor(PageComponentDescriptor descriptor) {
  Assert.notNull(descriptor, "descriptor");
  Assert.state(this.descriptor == null, "this.descriptor == null");
  this.descriptor = descriptor;
}

代码示例来源: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

private void validate() {
  Assert.state(config.raster != null, "raster == null");
  Assert.state(config.path != null || pointData != null, "path != null || pointData != null");
  Assert.state(config.path == null && pointData != null
         || config.path != null && pointData == null,
         "path == null && pointData != null || path != null && pointData == null");
}

代码示例来源: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 WWLayer createWWLayer() {
    Assert.state(WWLayerClass != null, "WWLayerClass != null");
    Object object;
    try {
      object = WWLayerClass.newInstance();
    } catch (Throwable e) {
      throw new IllegalStateException("WWLayerClass.newInstance()", e);
    }
    Assert.state(object instanceof WWLayer, "object instanceof WWLayer");
    return (WWLayer) object;
  }
}

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

public DefaultPageComponentContext(ApplicationPage page, PageComponentPane pane) {
  Assert.notNull(page, "page");
  this.page = page;
  this.pane = pane;
}

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

TransientAction(Action delegate, String path) {
  Assert.notNull(delegate, "delegate");
  Assert.notNull(path, "path");
  Assert.argument(path.endsWith(".instance"), "path");
  Assert.argument(path.contains("/"), "path");
  this.path = path;
  this.delegate = delegate;
  Action oldDelegate = DELEGATES.put(path, delegate);
  if (oldDelegate != null) {
    SystemUtils.LOG.info(String.format("Proxy action %s registered once more. Replacing the old action.%n", this.path));
  }
  SystemUtils.LOG.info(String.format("Proxy action added as %s%n", this.path));
}

代码示例来源: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

@Override
public RecordSource loadSource() throws IOException {
  Assert.state(reader != null, "reader != null");
  Assert.state(dateFormat != null, "dateFormat != null");
  return new CsvRecordSource(reader, dateFormat);
}

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

@SuppressWarnings("unchecked")
public UndoableProductNodeDeletion(ProductNodeGroup<T> productNodeGroup, T productNode, int index) {
  Assert.notNull(productNodeGroup, "group");
  Assert.notNull(productNode, "node");
  this.productNodeGroup = productNodeGroup;
  this.productNode = productNode;
  this.index = index;
}

代码示例来源: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

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: bcdev/beam

protected ToolView createToolView() {
  Assert.state(toolViewClass != null, "toolViewClass != null");
  Object object;
  try {
    object = toolViewClass.newInstance();
  } catch (Throwable e) {
    throw new IllegalStateException("viewClass.newInstance()", e);
  }
  Assert.state(object instanceof ToolView, "object instanceof ToolView");
  ToolView toolView = (ToolView) object;
  toolView.setDescriptor(this);
  return toolView;
}

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

public ReadProductOperation(File file, String formatName) {
  Assert.notNull(file, "file");
  Assert.notNull(formatName, "formatName");
  this.file = file;
  this.formatName = formatName;
  ph = PhWrapper.NULL;
}

代码示例来源: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

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

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

/**
 * Create a panel that allows the user to set the parameters in the given {@link BindingContext}. Clients that want
 * to create their own panel representation on the given properties need to overwrite this method.
 *
 * @param context The {@link BindingContext} for the panel.
 *
 * @return A JPanel instance for the given {@link BindingContext}, never {@code null}.
 */
protected JPanel createPanel(BindingContext context) {
  Assert.state(isInitialised());
  return new PreferencesPanel(null, bindingContext).getComponent();
}

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

/**
 * @param progressHandle The progress handle.
 */
public void setProgressHandle(ProgressHandle progressHandle) {
  Assert.notNull(progressHandle);
  this.progressHandle = progressHandle;
}

相关文章