01: package org.bouncycastle.openpgp;
02:
03: /**
04: * Holder for a list of PGPOnePassSignatures
05: */
06: public class PGPOnePassSignatureList {
07: PGPOnePassSignature[] sigs;
08:
09: public PGPOnePassSignatureList(PGPOnePassSignature[] sigs) {
10: this .sigs = new PGPOnePassSignature[sigs.length];
11:
12: System.arraycopy(sigs, 0, this .sigs, 0, sigs.length);
13: }
14:
15: public PGPOnePassSignatureList(PGPOnePassSignature sig) {
16: this .sigs = new PGPOnePassSignature[1];
17: this .sigs[0] = sig;
18: }
19:
20: public PGPOnePassSignature get(int index) {
21: return sigs[index];
22: }
23:
24: public int size() {
25: return sigs.length;
26: }
27:
28: public boolean isEmpty() {
29: return (sigs.length == 0);
30: }
31: }
|