Package jgromacs.data
Class FrameIndexSet
java.lang.Object
jgromacs.data.FrameIndexSet
- All Implemented Interfaces:
Cloneable
Objects of this class represent a single frame index set
-
Constructor Summary
ConstructorsConstructorDescriptionConstructs a new FrameIndexSet objectFrameIndexSet
(String name) Constructs a new FrameIndexSet object of a given nameFrameIndexSet
(ArrayList<Integer> list) Constructs a new FrameIndexSet object and loads data from an ArrayListFrameIndexSet
(ArrayList<Integer> list, String name) Constructs a new FrameIndexSet object of a given name and loads data from an ArrayListFrameIndexSet
(TreeSet<Integer> set) Constructs a new FrameIndexSet object and loads data from a TreeSetFrameIndexSet
(TreeSet<Integer> set, String name) Constructs a new FrameIndexSet object of a given name and loads data from a TreeSetConstructs a new FrameIndexSet object identical to a given FrameIndexSet -
Method Summary
Modifier and TypeMethodDescriptionvoid
addFrame
(int frame_index) Adds a new frame to the frame index setclone()
Returns an identical FrameIndexSet objectboolean
Returns true if this frame index set is identical to anotherReturns frame index set as an ArrayListReturns frame index set as a TreeSetgetName()
Returns the name of frame index setint
Returns the number of frames in this frame index setint
hashCode()
Returns hash codeintersect
(FrameIndexSet other) Returns the intersection of this frame index set and anotherboolean
isFrameIn
(int frame_index) Returns true if the frame index set contains a given frame indexvoid
removeFrame
(int frame_index) Removes a frame from the frame index setvoid
Sets the name of frame index setsubtract
(FrameIndexSet other) Returns the subtraction of another frame index set from this frame index settoString()
Returns the String representation of frame index setReturns summary information about the frame index setunion
(FrameIndexSet other) Returns the union of this frame index set and another
-
Constructor Details
-
FrameIndexSet
public FrameIndexSet()Constructs a new FrameIndexSet object -
FrameIndexSet
Constructs a new FrameIndexSet object of a given name -
FrameIndexSet
Constructs a new FrameIndexSet object and loads data from an ArrayList -
FrameIndexSet
Constructs a new FrameIndexSet object of a given name and loads data from an ArrayList -
FrameIndexSet
Constructs a new FrameIndexSet object and loads data from a TreeSet -
FrameIndexSet
Constructs a new FrameIndexSet object of a given name and loads data from a TreeSet -
FrameIndexSet
Constructs a new FrameIndexSet object identical to a given FrameIndexSet
-
-
Method Details
-
getName
Returns the name of frame index set- Returns:
- Name of frame index set
-
setName
Sets the name of frame index set -
getAsTreeSet
Returns frame index set as a TreeSet- Returns:
- frame index set as a TreeSet
-
getAsArrayList
Returns frame index set as an ArrayList- Returns:
- frame index set as an ArrayList
-
getNumberOfFrames
public int getNumberOfFrames()Returns the number of frames in this frame index set- Returns:
- number of frames
-
isFrameIn
public boolean isFrameIn(int frame_index) Returns true if the frame index set contains a given frame index -
addFrame
public void addFrame(int frame_index) Adds a new frame to the frame index set -
removeFrame
public void removeFrame(int frame_index) Removes a frame from the frame index set -
intersect
Returns the intersection of this frame index set and another- Returns:
- intersection of two frame index sets
-
subtract
Returns the subtraction of another frame index set from this frame index set- Returns:
- subtraction of two frame index sets
-
union
Returns the union of this frame index set and another- Returns:
- union of two frame index sets
-
toString
Returns the String representation of frame index set -
toStringInfo
Returns summary information about the frame index set- Returns:
- summary information
-
equals
Returns true if this frame index set is identical to another -
hashCode
public int hashCode()Returns hash code -
clone
Returns an identical FrameIndexSet object
-