Class AttributeUtil


  • public final class AttributeUtil
    extends java.lang.Object
    • Constructor Detail

      • AttributeUtil

        private AttributeUtil()
    • Method Detail

      • toNonnullArray

        @SafeVarargs
        @NotNull
        public static <T> @NotNull T @Nullable [] toNonnullArray​(@Nullable
                                                                 @Nullable T... values)
      • notNullOrElse

        @NotNull
        public static <T> T notNullOrElse​(@Nullable
                                          T value,
                                          @NotNull
                                          T defaultValue)
      • parseAxisPair

        @NotNull
        public static @NotNull AttributeUtil.AxisPair parseAxisPair​(@NotNull
                                                                    @NotNull AttributeNode node,
                                                                    @NotNull
                                                                    @NotNull java.lang.String xAttr,
                                                                    @NotNull
                                                                    @NotNull java.lang.String yAttr,
                                                                    @NotNull
                                                                    @NotNull Length fallback,
                                                                    Inherited inherited,
                                                                    @NotNull
                                                                    @NotNull java.util.function.Function<@NotNull LengthValue,​@Nullable LengthValue> validator)
      • arrayContains

        @Contract(pure=true)
        public static <T> boolean arrayContains​(T @NotNull [] arr,
                                                T element)