gpt4 book ai didi

com.googlecode.streamflyer.internal.thirdparty.ZzzValidate.notNull()方法的使用及代码示例

转载 作者:知者 更新时间:2024-03-13 12:27:58 27 4
gpt4 key购买 nike

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

ZzzValidate.notNull介绍

[英]Validate that the specified argument is not null; otherwise throwing an exception.

Validate.notNull(myObject);

The message of the exception is "The validated object is null".
[中]验证指定的参数不是null;否则将引发异常。

Validate.notNull(myObject);

异常的消息是“已验证的对象为空”。

代码示例

代码示例来源:origin: com.googlecode.streamflyer/streamflyer-core

public ModificationFactoryDecorator(ModificationFactory delegate) {
  super();
  ZzzValidate.notNull(delegate, "delegate must not be null");
  this.delegate = delegate;
}

代码示例来源:origin: com.googlecode.streamflyer/streamflyer-core

/**
 * <p>
 * Validate that the specified argument is not <code>null</code>; otherwise throwing an exception.
 * 
 * <pre>
 * Validate.notNull(myObject);
 * </pre>
 * <p>
 * The message of the exception is &quot;The validated object is null&quot;.
 * </p>
 * 
 * @param object
 *            the object to check
 * @throws IllegalArgumentException
 *             if the object is <code>null</code>
 */
public static void notNull(Object object) {
  notNull(object, "The validated object is null");
}

代码示例来源:origin: com.googlecode.streamflyer/streamflyer-core

/**
 * This token matches the given regex and the match will be processed with the given {@link MatchProcessor}.
 * 
 * @param name
 *            See {@link #name}
 * @param regex
 *            The regex describes how a token can be matched. Embed flags via {@link EmbeddedFlagUtil}.
 * @param matchProcessor
 */
public Token(String name, String regex, MatchProcessor matchProcessor) {
  super();
  ZzzValidate.notNull(matchProcessor, "matchProcessor must not be null");
  this.name = name;
  this.regex = regex;
  this.matchProcessor = matchProcessor;
  this.capturingGroupCount = Pattern.compile(regex).matcher("").groupCount();
}

代码示例来源:origin: com.googlecode.streamflyer/streamflyer-core

/**
 * Validates that the given collection is not empty.
 * 
 * @param collection
 * @param collectionName
 */
public static void isNotEmpty(Collection<?> collection, String collectionName) {
  notNull(collection, collectionName + " must not be null");
  isTrue(!collection.isEmpty(), collectionName + " must not be empty");
}

代码示例来源:origin: com.googlecode.streamflyer/streamflyer-core

public XmlVersionModifier(String xmlVersion, int newNumberOfChars) {
  ZzzValidate.notNull(xmlVersion, "xmlVersion must not be null");
  this.factory = new ModificationFactory(0, newNumberOfChars);
  this.xmlVersion = xmlVersion;
}

代码示例来源:origin: com.googlecode.streamflyer/streamflyer-core

/**
 * @param replacement
 */
public ReplacingProcessor(String replacement) {
  super();
  // validate arguments
  ZzzValidate.notNull(replacement, "replacement must not be null");
  // parse replacement
  this.parts = parseReplacement(replacement);
  if (parts.size() == 1 && (parts.get(0) instanceof CharSequence)) {
    this.replacementWithoutGroupReferences = (CharSequence) parts.get(0);
  } else {
    this.replacementWithoutGroupReferences = null;
  }
}

代码示例来源:origin: com.googlecode.streamflyer/streamflyer-core

/**
 * @param newNumberOfChars
 * @param replacement
 *            the string that shall replace invalid XML characters. This string may contain "$0" which refers to the
 *            replaced character, see {@link Matcher#replaceAll(String)}
 * @param xmlVersion
 *            Must not be <code>null</code>.
 * @param dollarZero
 */
public InvalidXmlCharacterModifier(int newNumberOfChars, String replacement, String xmlVersion, boolean dollarZero) {
  ZzzValidate.notNull(replacement, "replacement must not be null");
  ZzzValidate.notNull(xmlVersion, "xmlVersion must not be null");
  this.factory = new ModificationFactory(0, newNumberOfChars);
  this.replacement = replacement;
  this.dollarZero = dollarZero;
  // initialize matcher
  Pattern pattern;
  if (XML_10_VERSION.equals(xmlVersion)) {
    pattern = Pattern.compile(getInvalidXmlCharacterRegex_Xml10());
  } else if (XML_11_VERSION.equals(xmlVersion)) {
    pattern = Pattern.compile(getInvalidXmlCharacterRegex_Xml11());
  } else {
    throw new IllegalArgumentException("xmlVersion has the illegal " + "(or unsupported) value " + xmlVersion);
  }
  this.matcher = pattern.matcher("");
}

代码示例来源:origin: com.googlecode.streamflyer/streamflyer-core

public PositionOrientedModifier(Map<Long, Change> modifications) {
  ZzzValidate.notNull(modifications, "modifications must not be null");
  this.modifications = modifications;
  this.factory = new PositionAwareModificationFactory(new ModificationFactory(3, 10));
}

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com