Package mil.nga.geopackage.db.table
Class Constraints
- java.lang.Object
-
- mil.nga.geopackage.db.table.Constraints
-
public class Constraints extends Object
User table or column constraints- Since:
- 5.0.0
- Author:
- osbornb
-
-
Constructor Summary
Constructors Constructor Description Constraints()
ConstructorConstraints(Constraints constraints)
Copy Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
add(Collection<Constraint> constraints)
Add constraintsvoid
add(Constraint constraint)
Add constraintvoid
add(Constraints constraints)
Add constraintsList<Constraint>
all()
Get the constraintsList<Constraint>
clear()
Clear the constraintsList<Constraint>
clear(ConstraintType type)
Clear the constraints of the provided typeConstraints
copy()
Copy the constraintsConstraint
get(int index)
Get the constraint at the indexList<Constraint>
get(ConstraintType type)
Get the constraints of the provided typeboolean
has()
Check if has constraintsboolean
has(ConstraintType type)
Check if has constraints of the provided typeint
size()
Get the number of constraintsint
size(ConstraintType type)
Get the number of constraints of the provided type
-
-
-
Constructor Detail
-
Constraints
public Constraints()
Constructor
-
Constraints
public Constraints(Constraints constraints)
Copy Constructor- Parameters:
constraints
- constraints
-
-
Method Detail
-
add
public void add(Constraint constraint)
Add constraint- Parameters:
constraint
- constraint
-
add
public void add(Collection<Constraint> constraints)
Add constraints- Parameters:
constraints
- constraints
-
add
public void add(Constraints constraints)
Add constraints- Parameters:
constraints
- constraints
-
has
public boolean has()
Check if has constraints- Returns:
- true if has constraints
-
has
public boolean has(ConstraintType type)
Check if has constraints of the provided type- Parameters:
type
- constraint type- Returns:
- true if has constraints
-
size
public int size()
Get the number of constraints- Returns:
- size
-
size
public int size(ConstraintType type)
Get the number of constraints of the provided type- Parameters:
type
- constraint type- Returns:
- size
-
all
public List<Constraint> all()
Get the constraints- Returns:
- constraints
-
get
public Constraint get(int index)
Get the constraint at the index- Parameters:
index
- constraint index- Returns:
- constraint
-
get
public List<Constraint> get(ConstraintType type)
Get the constraints of the provided type- Parameters:
type
- constraint type- Returns:
- constraints
-
clear
public List<Constraint> clear()
Clear the constraints- Returns:
- cleared constraints
-
clear
public List<Constraint> clear(ConstraintType type)
Clear the constraints of the provided type- Parameters:
type
- constraint type- Returns:
- cleared constraints
-
copy
public Constraints copy()
Copy the constraints- Returns:
- constraints
-
-