summaryrefslogtreecommitdiffstats
path: root/bcprov/src/main/java/org/bouncycastle/asn1/ASN1EncodableVector.java
diff options
context:
space:
mode:
Diffstat (limited to 'bcprov/src/main/java/org/bouncycastle/asn1/ASN1EncodableVector.java')
-rw-r--r--bcprov/src/main/java/org/bouncycastle/asn1/ASN1EncodableVector.java27
1 files changed, 27 insertions, 0 deletions
diff --git a/bcprov/src/main/java/org/bouncycastle/asn1/ASN1EncodableVector.java b/bcprov/src/main/java/org/bouncycastle/asn1/ASN1EncodableVector.java
index 2819a8d..530da52 100644
--- a/bcprov/src/main/java/org/bouncycastle/asn1/ASN1EncodableVector.java
+++ b/bcprov/src/main/java/org/bouncycastle/asn1/ASN1EncodableVector.java
@@ -3,19 +3,35 @@ package org.bouncycastle.asn1;
import java.util.Enumeration;
import java.util.Vector;
+/**
+ * Mutable class for building ASN.1 constructed objects.
+ */
public class ASN1EncodableVector
{
Vector v = new Vector();
+ /**
+ * Base constructor.
+ */
public ASN1EncodableVector()
{
}
+ /**
+ * Add an encodable to the vector.
+ *
+ * @param obj the encodable to add.
+ */
public void add(ASN1Encodable obj)
{
v.addElement(obj);
}
+ /**
+ * Add the contents of another vector.
+ *
+ * @param other the vector to add.
+ */
public void addAll(ASN1EncodableVector other)
{
for (Enumeration en = other.v.elements(); en.hasMoreElements();)
@@ -24,11 +40,22 @@ public class ASN1EncodableVector
}
}
+ /**
+ * Return the object at position i in this vector.
+ *
+ * @param i the index of the object of interest.
+ * @return the object at position i.
+ */
public ASN1Encodable get(int i)
{
return (ASN1Encodable)v.elementAt(i);
}
+ /**
+ * Return the size of the vector.
+ *
+ * @return the object count in the vector.
+ */
public int size()
{
return v.size();