jp.bitmeister.asn1.type.builtin
Class SEQUENCE_OF<T extends ASN1Type>

java.lang.Object
  extended by jp.bitmeister.asn1.type.ASN1Type
      extended by jp.bitmeister.asn1.type.CollectionType<T,java.util.List<T>>
          extended by jp.bitmeister.asn1.type.builtin.SEQUENCE_OF<T>
All Implemented Interfaces:
java.lang.Cloneable, SizeCountable

public abstract class SEQUENCE_OF<T extends ASN1Type>
extends CollectionType<T,java.util.List<T>>

Represents ASN.1 'SEQUENCE OF' type.

This is the class used for defining 'SEQUENCE OF' types. Generic type parameter T indicates component type of the 'SEQUENCE OF' type. Constructors of a sub-class of SEQUENCE_OF must call parent constructor with componentType parameter that is the class object of T in them.

Author:
WATANABE, Jun.

Field Summary
 
Fields inherited from class jp.bitmeister.asn1.type.ASN1Type
stringBuilder
 
Constructor Summary
SEQUENCE_OF(java.lang.Class<T> componentType)
          Instantiate an empty SEQUENCE_OF.
SEQUENCE_OF(java.lang.Class<T> componentType, T... components)
          Instantiate a SEQUENCE_OF and initialize it with the components.
 
Method Summary
<R,E extends java.lang.Throwable>
R
accept(ASN1Visitor<R,E> visitor)
          Accepts the ASN1Visitor and calls a visit method of the visitor.
protected  java.util.List<T> newCollection()
          Instantiates a new collection of the component type.
 
Methods inherited from class jp.bitmeister.asn1.type.CollectionType
clear, clone, collection, componentSpecification, componentType, hashCode, hasValue, size, valueEquals
 
Methods inherited from class jp.bitmeister.asn1.type.ASN1Type
equals, instantiate, matches, specification, toString, validate
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SEQUENCE_OF

public SEQUENCE_OF(java.lang.Class<T> componentType)
Instantiate an empty SEQUENCE_OF.

Parameters:
componentType - The class instance of component type.

SEQUENCE_OF

public SEQUENCE_OF(java.lang.Class<T> componentType,
                   T... components)
Instantiate a SEQUENCE_OF and initialize it with the components.

Parameters:
componentType - The class instance of component type.
components - Components to be set this instance.
Method Detail

newCollection

protected java.util.List<T> newCollection()
Description copied from class: CollectionType
Instantiates a new collection of the component type.

Specified by:
newCollection in class CollectionType<T extends ASN1Type,java.util.List<T extends ASN1Type>>
Returns:
A new collection.

accept

public <R,E extends java.lang.Throwable> R accept(ASN1Visitor<R,E> visitor)
         throws E extends java.lang.Throwable
Description copied from class: ASN1Type
Accepts the ASN1Visitor and calls a visit method of the visitor.

Specified by:
accept in class ASN1Type
Parameters:
visitor - The visitor.
Returns:
Result.
Throws:
E - When an error occured in the visit method of the visitor.
E extends java.lang.Throwable


Copyright © 2012 BitMeister Inc. All Rights Reserved.