21 lines
722 B
Java
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;
|
|
}
|