codec.asn1
Class ConstraintCollection
java.lang.Object
|
+--java.util.AbstractCollection
|
+--java.util.AbstractList
|
+--java.util.ArrayList
|
+--codec.asn1.ConstraintCollection
- All Implemented Interfaces:
- Cloneable, Collection, Constraint, List, Serializable
- public class ConstraintCollection
- extends ArrayList
- implements Constraint
Implements a collection of constraints that can be added
to any ASN1Type. This class is used by the
ASN1AbstractType in order to manage multiple
constraints. It inherits from ArrayList and simply calls
constrain on all objects contained in it upon a
call to its own constrain method.
- Version:
- "$Id: ConstraintCollection.java,v 1.2 2000/12/06 17:47:28 vroth Exp $"
- Author:
- Volker Roth
- See Also:
- Serialized Form
| Methods inherited from class java.util.ArrayList |
add, add, addAll, addAll, clear, clone, contains, ensureCapacity, get, indexOf, isEmpty, lastIndexOf, remove, removeRange, set, size, toArray, toArray, trimToSize |
ConstraintCollection
public ConstraintCollection()
ConstraintCollection
public ConstraintCollection(int capacity)
- Creates an instance that is initialized with the given capacity.
- Parameters:
capacity - The initial capacity of this List.
constrain
public void constrain(ASN1Type o)
throws ConstraintException
- Calls
constrain on all objects contained in
this list. It is the responsibility of the user to assure that only
objects that implement the Constraint interface are
added to this constraint collection. Non-adherence will cause a
ClassCastException being thrown.
- Specified by:
constrain in interface Constraint
- Parameters:
o - The caller of the method. This reference is passed to all
subordinate constraints.- Throws:
ConstraintException -
addConstraint
public void addConstraint(Constraint o)
- Adds a
Constraint to this list.
- Parameters:
o - The Constraint to add.
Copyright © Fraunhofer Gesellschaft. All Rights Reserved.