Class GKBehavior

    • Constructor Detail

      • GKBehavior

        protected GKBehavior​(org.moe.natj.general.Pointer peer)
    • Method Detail

      • accessInstanceVariablesDirectly

        public static boolean accessInstanceVariablesDirectly()
      • allocWithZone

        public static GKBehavior allocWithZone​(org.moe.natj.general.ptr.VoidPtr zone)
      • automaticallyNotifiesObserversForKey

        public static boolean automaticallyNotifiesObserversForKey​(@NotNull
                                                                   @NotNull java.lang.String key)
      • behaviorWithGoalWeight

        public static GKBehavior behaviorWithGoalWeight​(@NotNull
                                                        @NotNull GKGoal goal,
                                                        float weight)
        Creates a behavior with a single goal and weight
      • behaviorWithGoals

        public static GKBehavior behaviorWithGoals​(@NotNull
                                                   @NotNull NSArray<? extends GKGoal> goals)
        Creates a behavior with an array of goals. All weights are set to 1.0f
      • behaviorWithGoalsAndWeights

        public static GKBehavior behaviorWithGoalsAndWeights​(@NotNull
                                                             @NotNull NSArray<? extends GKGoal> goals,
                                                             @NotNull
                                                             @NotNull NSArray<? extends NSNumber> weights)
        Creates a behavior with two associated arrays of goals and weights
      • behaviorWithWeightedGoals

        public static GKBehavior behaviorWithWeightedGoals​(@NotNull
                                                           @NotNull NSDictionary<? extends GKGoal,​? extends NSNumber> weightedGoals)
        Creates a behavior with a dictionary of goal/weight pairs
      • cancelPreviousPerformRequestsWithTarget

        public static void cancelPreviousPerformRequestsWithTarget​(@NotNull
                                                                   @NotNull java.lang.Object aTarget)
      • cancelPreviousPerformRequestsWithTargetSelectorObject

        public static void cancelPreviousPerformRequestsWithTargetSelectorObject​(@NotNull
                                                                                 @NotNull java.lang.Object aTarget,
                                                                                 @NotNull
                                                                                 @NotNull org.moe.natj.objc.SEL aSelector,
                                                                                 @Nullable
                                                                                 @Nullable java.lang.Object anArgument)
      • classFallbacksForKeyedArchiver

        @NotNull
        public static @NotNull NSArray<java.lang.String> classFallbacksForKeyedArchiver()
      • classForKeyedUnarchiver

        @NotNull
        public static @NotNull org.moe.natj.objc.Class classForKeyedUnarchiver()
      • debugDescription_static

        public static java.lang.String debugDescription_static()
      • description_static

        public static java.lang.String description_static()
      • hash_static

        public static long hash_static()
      • instanceMethodSignatureForSelector

        public static NSMethodSignature instanceMethodSignatureForSelector​(org.moe.natj.objc.SEL aSelector)
      • instancesRespondToSelector

        public static boolean instancesRespondToSelector​(org.moe.natj.objc.SEL aSelector)
      • isSubclassOfClass

        public static boolean isSubclassOfClass​(org.moe.natj.objc.Class aClass)
      • keyPathsForValuesAffectingValueForKey

        @NotNull
        public static @NotNull NSSet<java.lang.String> keyPathsForValuesAffectingValueForKey​(@NotNull
                                                                                             @NotNull java.lang.String key)
      • resolveClassMethod

        public static boolean resolveClassMethod​(org.moe.natj.objc.SEL sel)
      • resolveInstanceMethod

        public static boolean resolveInstanceMethod​(org.moe.natj.objc.SEL sel)
      • setVersion_static

        public static void setVersion_static​(long aVersion)
      • superclass_static

        public static org.moe.natj.objc.Class superclass_static()
      • version_static

        public static long version_static()
      • copyWithZone

        @NotNull
        public @NotNull java.lang.Object copyWithZone​(@Nullable
                                                      @Nullable org.moe.natj.general.ptr.VoidPtr zone)
        Specified by:
        copyWithZone in interface NSCopying
      • countByEnumeratingWithStateObjectsCount

        public long countByEnumeratingWithStateObjectsCount​(@NotNull
                                                            @NotNull org.moe.natj.general.ptr.VoidPtr state,
                                                            @NotNull
                                                            @NotNull org.moe.natj.general.ptr.Ptr<org.moe.natj.objc.ObjCObject> buffer,
                                                            long len)
        Specified by:
        countByEnumeratingWithStateObjectsCount in interface NSFastEnumeration
      • goalCount

        public long goalCount()
        The number of GKGoals in this behavior
      • objectAtIndexedSubscript

        @NotNull
        public @NotNull GKGoal objectAtIndexedSubscript​(long idx)
        Supports getting goals via a [int] subscript.
      • objectForKeyedSubscript

        @Nullable
        public @Nullable NSNumber objectForKeyedSubscript​(@NotNull
                                                          @NotNull GKGoal goal)
        Supports getting a weight via a [goal] subscript.
      • removeAllGoals

        public void removeAllGoals()
        Removes all the goals on the behavior.
      • removeGoal

        public void removeGoal​(@NotNull
                               @NotNull GKGoal goal)
        Remove the indicated goal from this behavior.
        Parameters:
        goal - the goal to be removed
      • setObjectForKeyedSubscript

        public void setObjectForKeyedSubscript​(@NotNull
                                               @NotNull NSNumber weight,
                                               @NotNull
                                               @NotNull GKGoal goal)
        Supports setting a weight via a [goal] subscript.
      • setWeightForGoal

        public void setWeightForGoal​(float weight,
                                     @NotNull
                                     @NotNull GKGoal goal)
        Adds a new goal or changes the weight of the existing goal in this behavior. If the goal does not exist in this behavior, it is added.
        Parameters:
        weight - the weight for this goal
        goal - the goal who's weight to change
      • weightForGoal

        public float weightForGoal​(@NotNull
                                   @NotNull GKGoal goal)
        Gets the current weight for a given goal.
        Returns:
        the weight of the goal, or 0 if there is no such goal on this behavior
      • useStoredAccessor

        @Deprecated
        public static boolean useStoredAccessor()
        Deprecated.