• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Java NonNull类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中net.kyori.blizzard.NonNull的典型用法代码示例。如果您正苦于以下问题:Java NonNull类的具体用法?Java NonNull怎么用?Java NonNull使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



NonNull类属于net.kyori.blizzard包,在下文中一共展示了NonNull类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: createArgument

import net.kyori.blizzard.NonNull; //导入依赖的package包/类
@NonNull
private static <T> Argument createArgument(@NonNull final Binder binder, @NonNull final Type type, @NonNull final List<? extends Annotation> annotations) {
  @Nullable Annotation classifier = null;
  final List<Annotation> modifiers = new ArrayList<>();

  for(final Annotation annotation : annotations) {
    // Capture a classifier if an annotation is annotated
    if(annotation.annotationType().getAnnotation(Classifier.class) != null) {
      classifier = annotation;
    } else {
      modifiers.add(annotation);
    }
  }

  @Nullable final Binding<T> binding = binder.binding(BindingKey.of(type, classifier != null ? classifier.annotationType() : null));
  if(binding == null) {
    throw new IllegalArgumentException("Could not find a binding for argument type '" + type + "' with modifiers " + annotations);
  }

  return new Argument(binding.provider(), modifiers);
}
 
开发者ID:KyoriPowered,项目名称:ghost,代码行数:22,代码来源:ArgumentParser.java


示例2: put

import net.kyori.blizzard.NonNull; //导入依赖的package包/类
<T> void put(@NonNull final BindingKey<T> key, @NonNull final Provider<T> provider) {
  if(this.bindings.containsKey(key)) {
    throw new IllegalStateException("A binding for " + key + " already exists");
  }
  this.bindings.put(key, new Binding<T>() {
    @NonNull
    @Override
    public BindingKey<T> key() {
      return key;
    }

    @NonNull
    @Override
    public Provider<T> provider() {
      return provider;
    }
  });
}
 
开发者ID:KyoriPowered,项目名称:ghost,代码行数:19,代码来源:BinderBuilder.java


示例3: annotatedWith

import net.kyori.blizzard.NonNull; //导入依赖的package包/类
@NonNull
@Override
public Binding.Builder<T> annotatedWith(@Nullable final Class<? extends Annotation> annotation) {
  if(annotation != null) {
    checkArgument(annotation.getAnnotation(Classifier.class) != null, "The '@%s' annotation must be decorated with '@%s' to be used as a classifier", annotation.getName(), Classifier.class.getName());
  }
  return new BindingBuilder<>(this.binder, this.key.classifier(annotation));
}
 
开发者ID:KyoriPowered,项目名称:ghost,代码行数:9,代码来源:BinderBuilder.java


示例4: map

import net.kyori.blizzard.NonNull; //导入依赖的package包/类
@NonNull
@Override
public MuVector2i map(@NonNull final IntUnaryOperator operator) {
  this.x = operator.applyAsInt(this.x);
  this.y = operator.applyAsInt(this.y);
  return this;
}
 
开发者ID:KyoriPowered,项目名称:math,代码行数:8,代码来源:MuVector2i.java


示例5: pow

import net.kyori.blizzard.NonNull; //导入依赖的package包/类
@NonNull
@Override
public MuVector2i pow(final int power) {
  this.x = Mth.floor(Math.pow(this.x, power));
  this.y = Mth.floor(Math.pow(this.y, power));
  return this;
}
 
开发者ID:KyoriPowered,项目名称:math,代码行数:8,代码来源:MuVector2i.java


示例6: sub

import net.kyori.blizzard.NonNull; //导入依赖的package包/类
@NonNull
@Override
public ImVector4l sub(final long x, final long y, final long z, final long w) {
  if(x == 0 && y == 0 && z == 0 && w == 0) {
    return this;
  }
  return of(this.x - x, this.y - y, this.z - z, this.w - w);
}
 
开发者ID:KyoriPowered,项目名称:math,代码行数:9,代码来源:ImVector4l.java


示例7: append

import net.kyori.blizzard.NonNull; //导入依赖的package包/类
@NonNull
@Override
public KeybindComponent append(@NonNull final Component component) {
  this.detectCycle(component); // detect cycle before modifying
  final List<Component> children = new ArrayList<>(this.children.size() + 1);
  children.addAll(this.children);
  children.add(component);
  return new KeybindComponent(children, this.color, this.obfuscated, this.bold, this.strikethrough, this.underlined, this.italic, this.clickEvent, this.hoverEvent, this.insertion, this.keybind);
}
 
开发者ID:KyoriPowered,项目名称:text,代码行数:10,代码来源:KeybindComponent.java


示例8: div

import net.kyori.blizzard.NonNull; //导入依赖的package包/类
@NonNull
@Override
public MuVector2i div(final int x, final int y) {
  this.x /= x;
  this.y /= y;
  return this;
}
 
开发者ID:KyoriPowered,项目名称:math,代码行数:8,代码来源:MuVector2i.java


示例9: add

import net.kyori.blizzard.NonNull; //导入依赖的package包/类
@NonNull
@Override
public ImVector3l add(final long x, final long y, final long z) {
  if(x == 0 && y == 0 && z == 0) {
    return this;
  }
  return of(this.x + x, this.y + y, this.z + z);
}
 
开发者ID:KyoriPowered,项目名称:math,代码行数:9,代码来源:ImVector3l.java


示例10: AbstractComponent

import net.kyori.blizzard.NonNull; //导入依赖的package包/类
protected AbstractComponent(@NonNull final List<Component> children, @Nullable final TextColor color, @NonNull final TextDecoration.State obfuscated, @NonNull final TextDecoration.State bold, @NonNull final TextDecoration.State strikethrough, @NonNull final TextDecoration.State underlined, @NonNull final TextDecoration.State italic, @Nullable final ClickEvent clickEvent, @Nullable final HoverEvent hoverEvent, @Nullable final String insertion) {
  this.children = ImmutableList.copyOf(children);
  this.color = color;
  this.obfuscated = obfuscated;
  this.bold = bold;
  this.strikethrough = strikethrough;
  this.underlined = underlined;
  this.italic = italic;
  this.clickEvent = clickEvent;
  this.hoverEvent = hoverEvent;
  this.insertion = insertion;
}
 
开发者ID:KyoriPowered,项目名称:text,代码行数:13,代码来源:AbstractComponent.java


示例11: negate

import net.kyori.blizzard.NonNull; //导入依赖的package包/类
@NonNull
@Override
public MuMatrix3f negate() {
  this.m00 = -this.m00;
  this.m01 = -this.m01;
  this.m02 = -this.m02;
  this.m10 = -this.m10;
  this.m11 = -this.m11;
  this.m12 = -this.m12;
  this.m20 = -this.m20;
  this.m21 = -this.m21;
  this.m22 = -this.m22;
  return this;
}
 
开发者ID:KyoriPowered,项目名称:math,代码行数:15,代码来源:MuMatrix3f.java


示例12: negate

import net.kyori.blizzard.NonNull; //导入依赖的package包/类
@NonNull
@Override
public ImMatrix3f negate() {
  return of(
    -this.m00, -this.m01, -this.m02,
    -this.m10, -this.m11, -this.m12,
    -this.m20, -this.m21, -this.m22
  );
}
 
开发者ID:KyoriPowered,项目名称:math,代码行数:10,代码来源:ImMatrix3f.java


示例13: configure

import net.kyori.blizzard.NonNull; //导入依赖的package包/类
@Override
public final void configure(@NonNull final Binder.Builder builder) {
  checkState(this.builder == null, "Re-entry is not permitted");
  this.builder = builder;
  try {
    this.configure();
  } finally {
    this.builder = null;
  }
}
 
开发者ID:KyoriPowered,项目名称:ghost,代码行数:11,代码来源:AbstractModule.java


示例14: negate

import net.kyori.blizzard.NonNull; //导入依赖的package包/类
@NonNull
@Override
public MuVector3d negate() {
  this.x = -this.x;
  this.y = -this.y;
  this.z = -this.z;
  return this;
}
 
开发者ID:KyoriPowered,项目名称:math,代码行数:9,代码来源:MuVector3d.java


示例15: lerp

import net.kyori.blizzard.NonNull; //导入依赖的package包/类
@NonNull
@Override
public MuVector4d lerp(@NonNull final Vector4d vec, final double n) {
  final double u = 1 - n;
  this.x = u * this.x + n * vec.x();
  this.y = u * this.y + n * vec.y();
  this.z = u * this.z + n * vec.z();
  this.w = u * this.w + n * vec.w();
  return this;
}
 
开发者ID:KyoriPowered,项目名称:math,代码行数:11,代码来源:MuVector4d.java


示例16: set

import net.kyori.blizzard.NonNull; //导入依赖的package包/类
@NonNull
public MuVector3d set(final double x, final double y, final double z) {
  this.x = x;
  this.y = y;
  this.z = z;
  return this;
}
 
开发者ID:KyoriPowered,项目名称:math,代码行数:8,代码来源:MuVector3d.java


示例17: map

import net.kyori.blizzard.NonNull; //导入依赖的package包/类
@NonNull
@Override
public MuVector4i map(@NonNull final IntUnaryOperator operator) {
  this.x = operator.applyAsInt(this.x);
  this.y = operator.applyAsInt(this.y);
  this.z = operator.applyAsInt(this.z);
  this.w = operator.applyAsInt(this.w);
  return this;
}
 
开发者ID:KyoriPowered,项目名称:math,代码行数:10,代码来源:MuVector4i.java


示例18: abs

import net.kyori.blizzard.NonNull; //导入依赖的package包/类
@NonNull
@Override
public MuMatrix2d abs() {
  this.m00 = Math.abs(this.m00);
  this.m01 = Math.abs(this.m01);
  this.m10 = Math.abs(this.m10);
  this.m11 = Math.abs(this.m11);
  return this;
}
 
开发者ID:KyoriPowered,项目名称:math,代码行数:10,代码来源:MuMatrix2d.java


示例19: mul

import net.kyori.blizzard.NonNull; //导入依赖的package包/类
@NonNull
@Override
public ImMatrix4d mul(final double n) {
  return of(
    this.m00 * n, this.m01 * n, this.m02 * n, this.m03 * n,
    this.m10 * n, this.m11 * n, this.m12 * n, this.m13 * n,
    this.m20 * n, this.m21 * n, this.m22 * n, this.m23 * n,
    this.m30 * n, this.m31 * n, this.m32 * n, this.m33 * n
  );
}
 
开发者ID:KyoriPowered,项目名称:math,代码行数:11,代码来源:ImMatrix4d.java


示例20: negate

import net.kyori.blizzard.NonNull; //导入依赖的package包/类
@NonNull
@Override
public MuVector3i negate() {
  this.x = -this.x;
  this.y = -this.y;
  this.z = -this.z;
  return this;
}
 
开发者ID:KyoriPowered,项目名称:math,代码行数:9,代码来源:MuVector3i.java



注:本文中的net.kyori.blizzard.NonNull类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java ModuleInheritableNamedPointer类代码示例发布时间:2022-05-22
下一篇:
Java EmptyBitmapTextureAtlasSource类代码示例发布时间:2022-05-22
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap