ItemBuilder.java 文件源码

java
阅读 25 收藏 0 点赞 0 评论 0

项目:SupaCommons 作者:
/**
 * Sets this book's pages, assuming it is a book.
 * <p />
 * <b>Note: This is a clear and write operation, for appending, see {@link
 * #bookAdd(String...)}</b>
 * <p />
 * <b>UNSAFE</b>
 *
 * @param pages pages to set
 *
 * @return this item builder instance, for chaining
 */
public ItemBuilder bookSet(@Nonnull String... pages) {
  if (pages == null) {
    if (!this.failSilently) {
      throw new IllegalArgumentException("pages cannot be null.");
    }
    return this;
  }
  if (isBookMeta()) {
    try {
      ((BookMeta) this.itemMeta).setPages(pages);
    } catch (Exception e) {
      if (!this.failSilently) {
        e.printStackTrace();
      }
    }
  }
  return this;
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号