public class Pack
extends java.lang.Object
implements java.io.Serializable
Modifier and Type | Field and Description |
---|---|
static int |
BLACK
black colour
|
int |
color
The color of the node.
|
java.util.List |
dependencies
The list of packs this pack depends on
|
java.lang.String |
description
The pack description.
|
private static java.text.DecimalFormat |
formatter
Used of conversions.
|
private static double |
GIGABYTES
Used of conversions.
|
static int |
GREY
grey colour
|
java.lang.String |
group
The group the pack is associated with.
|
java.lang.String |
id
The langpack id
|
java.util.Set |
installGroups
An association of this pack to zero or more installation groups.
|
private static double |
KILOBYTES
Used of conversions.
|
boolean |
loose |
private static double |
MEGABYTES
Used of conversions.
|
java.lang.String |
name
The pack name.
|
long |
nbytes
The bumber of bytes contained in the pack.
|
java.util.List |
osConstraints
The target operation system of this pack
|
boolean |
preselected
Whether this pack is suggested (preselected for installation).
|
boolean |
required
True if the pack is required.
|
java.util.List |
revDependencies
Reverse dependencies(childs)
|
(package private) static long |
serialVersionUID |
static int |
WHITE
white colour
|
Constructor and Description |
---|
Pack(java.lang.String name,
java.lang.String id,
java.lang.String description,
java.util.List osConstraints,
java.util.List dependencies,
boolean required,
boolean preselected,
boolean loose)
The constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
addRevDep(java.lang.String name)
This adds a reverse dependency.
|
java.lang.String |
depString()
Creates a text list of all the packs it depend on
|
java.util.List |
getDependencies()
getter method
|
static java.lang.String |
toByteUnitsString(int bytes)
Convert bytes into appropiate mesaurements.
|
java.lang.String |
toString()
To a String (usefull for JLists).
|
static final long serialVersionUID
public boolean loose
public java.lang.String name
public java.lang.String id
public java.util.Set installGroups
public java.lang.String group
public java.lang.String description
public java.util.List osConstraints
public java.util.List dependencies
public java.util.List revDependencies
public boolean required
public long nbytes
public boolean preselected
public int color
public static final int WHITE
public static final int GREY
public static final int BLACK
private static final double KILOBYTES
private static final double MEGABYTES
private static final double GIGABYTES
private static final java.text.DecimalFormat formatter
public Pack(java.lang.String name, java.lang.String id, java.lang.String description, java.util.List osConstraints, java.util.List dependencies, boolean required, boolean preselected, boolean loose)
name
- The pack name.description
- The pack description.osConstraints
- the OS constraint (or null for any OS)required
- Indicates wether the pack is required or not.preselected
- This pack will be selected automatically.public java.lang.String toString()
toString
in class java.lang.Object
public java.util.List getDependencies()
public void addRevDep(java.lang.String name)
name
- The name of the pack that depents to this packpublic java.lang.String depString()
public static java.lang.String toByteUnitsString(int bytes)
bytes
- A number of bytes to convert to a String.