Package com.oss.asn1
Class SetOf<T extends AbstractData>
java.lang.Object
com.oss.asn1.AbstractData
com.oss.asn1.AbstractContainer
com.oss.asn1.SetOf<T>
- Type Parameters:
T
- type of the SET OF element value
- All Implemented Interfaces:
com.oss.asn1.Sizeable
,Serializable
,Cloneable
,Iterable<T>
- Direct Known Subclasses:
SetOfDeferred
,SetOfHugeDeferred
public abstract class SetOf<T extends AbstractData>
extends AbstractContainer
implements Iterable<T>
The SetOf class represents the ASN.1 SET OF type
- Since:
- ASN.1/Java 1.0-beta A
- See Also:
-
Field Summary
Fields inherited from class com.oss.asn1.AbstractData
EQUALS, GREATER_THAN, LESS_THAN
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Add an Element to this SET OF.Return SET OF as a collection of elements.final boolean
Compare 'this' object to another SetOf object to see if their contents are the same.get
(int atIndex) Get an Element from this SET OF.int
hashCode()
Returns a hash code for this objectvoid
Insert an Element into this SET OF at specified index.iterator()
Returns an iterator over the elements in this SET OF in proper sequence.void
Remove an Element from this SET OF.void
Set (replace) an Element in the SET OF.Methods inherited from class com.oss.asn1.AbstractContainer
clone, delete, elements, getSize, remove, removeAllElements, size
Methods inherited from class com.oss.asn1.AbstractData
equals, getTypeInfo, isEncodable, isPDU, isValid, toString, toString
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
Method Details
-
add
Add an Element to this SET OF.- Parameters:
element
- an element to add to this SET OF
-
set
Set (replace) an Element in the SET OF.- Parameters:
element
- new element to set.atIndex
- index of the replaced element.
-
get
Get an Element from this SET OF.- Parameters:
atIndex
- index of the element.- Returns:
- element specified by the index
-
insert
Insert an Element into this SET OF at specified index.- Parameters:
element
- element to insert.atIndex
- index of inserted element.
-
remove
Remove an Element from this SET OF.- Parameters:
element
- element to remove.
-
iterator
Returns an iterator over the elements in this SET OF in proper sequence.- Specified by:
iterator
in interfaceIterable<T extends AbstractData>
- Returns:
- Returns an iterator over the elements in this SET OF in proper sequence.
-
asCollection
Return SET OF as a collection of elements.- Returns:
- collection of elements.
-
equalTo
Compare 'this' object to another SetOf object to see if their contents are the same.- Parameters:
that
- the SetOf object to compare 'this' object to.- Returns:
- true if contents of both objects are the same.
-
hashCode
public int hashCode()Returns a hash code for this object- Overrides:
hashCode
in classAbstractContainer
- Returns:
- a hash code for this object
-