Files
pcinv/src/main/java/be/seeseepuff/pcinv/meta/Capacity.java
T
seeseemelk e703da995e
Build / build (push) Failing after 15s
Got most of the create menu working
2025-06-07 17:32:55 +02:00

21 lines
722 B
Java

package be.seeseepuff.pcinv.meta;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
/**
* An annotation to mark a property descriptor as representing some sort of capacity.
* It is used to render the capacity in the UI as bytes, kilobytes, megabytes, etc.
*/
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.FIELD)
public @interface Capacity {
/// Set to `true` if the capacity should include SI units (e.g., 1 KB = 1000 bytes).
boolean si() default false;
/// Set to `true` if the capacity should be displayed in IEC units (e.g., 1 KiB = 1024 bytes).
boolean iec() default true;
}