public class AttachmentGroupImpl extends Object implements AttachmentGroup
Constructor and Description |
---|
AttachmentGroupImpl(Collection<Attachment> attachments)
Construct.
|
Modifier and Type | Method and Description |
---|---|
com.chemaxon.calculations.sc.util.IntListSet |
attachedAtoms()
Indices of attached atoms.
|
com.chemaxon.calculations.sc.util.IntListSet |
attachmentAtoms()
Indices of attachment pseudo atoms.
|
Attachment |
byAtom(int index)
Retrieve attachment by its pseudo atom index.
|
boolean |
isAttachmentAtom(int index)
Check if given atom index denotes an attachment atom.
|
Iterator<Attachment> |
iterator() |
int |
size()
Size of this attachment group.
|
String |
toString() |
String |
toString(boolean multiline,
String prefix)
Create String representation.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
forEach, spliterator
public AttachmentGroupImpl(Collection<Attachment> attachments)
attachments
- Attachments to representIllegalArgumentException
- in case of attachment atom index collisionpublic com.chemaxon.calculations.sc.util.IntListSet attachmentAtoms()
AttachmentGroup
attachmentAtoms
in interface AttachmentGroup
public com.chemaxon.calculations.sc.util.IntListSet attachedAtoms()
AttachmentGroup
attachedAtoms
in interface AttachmentGroup
public Attachment byAtom(int index)
AttachmentGroup
byAtom
in interface AttachmentGroup
index
- Attachment pseudo atom indexpublic Iterator<Attachment> iterator()
iterator
in interface Iterable<Attachment>
public String toString(boolean multiline, String prefix)
AttachmentGroup
toString
in interface AttachmentGroup
multiline
- Print multiline Stringprefix
- Prefix for each linepublic String toString()
toString
in interface AttachmentGroup
toString
in class Object
public boolean isAttachmentAtom(int index)
AttachmentGroup
isAttachmentAtom
in interface AttachmentGroup
index
- Atom indexpublic int size()
AttachmentGroup
size
in interface AttachmentGroup