Package kr.toxicity.model.api.tracker
Interface ModelScaler
- All Known Implementing Classes:
ModelScaler.Composite
Model scaler
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interfaceBuilderstatic interfaceBuild-in deserializerstatic final classComposited scalerstatic final classDeserializerstatic interfaceGetter -
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptiondefault @NotNull ModelScalercomposite(@NotNull ModelScaler scaler) Composites this scaler to another one (a * b)static @NotNull ModelScalercomposite(@NotNull ModelScaler... scalers) Gets the composited scaler (a * b)@Nullable com.google.gson.JsonElementdata()Gets the data of this scalerstatic @NotNull ModelScalerGets the default scaler (1.0)static @NotNull ModelScalerdeserialize(@NotNull com.google.gson.JsonObject element) Deserializes scaler from JSONstatic @NotNull ModelScalerentity()Gets the entity's attribute scalerdefault @NotNull ModelScalermultiply(float value) Multiplies this scaler@NotNull Stringname()Gets this scaler's namefloatGets the scale of this trackerdefault @NotNull com.google.gson.JsonObjectSerializes this scaler to JSONstatic @NotNull ModelScalervalue(float value) Gets the constant scaler (value)
-
Field Details
-
DESERIALIZER
Deserializer
-
-
Method Details
-
name
Gets this scaler's name- Returns:
- name
-
scale
Gets the scale of this tracker- Parameters:
tracker- tracker- Returns:
- scale
-
data
@Nullable @Nullable com.google.gson.JsonElement data()Gets the data of this scaler- Returns:
- data
-
deserialize
@NotNull static @NotNull ModelScaler deserialize(@NotNull @NotNull com.google.gson.JsonObject element) Deserializes scaler from JSON- Parameters:
element- JSON element- Returns:
- result
-
defaultScaler
Gets the default scaler (1.0)- Returns:
- default scaler
-
entity
Gets the entity's attribute scaler- Returns:
- entity scaler
-
value
Gets the constant scaler (value)- Parameters:
value- value- Returns:
- value scaler
-
composite
Gets the composited scaler (a * b)- Parameters:
scalers- scalers- Returns:
- composited scaler
-
multiply
Multiplies this scaler- Parameters:
value- value- Returns:
- new scaler
-
composite
Composites this scaler to another one (a * b)- Parameters:
scaler- other- Returns:
- composited scaler
-
serialize
@NotNull default @NotNull com.google.gson.JsonObject serialize()Serializes this scaler to JSON- Returns:
- JSON
-