Package jgromacs.data

# Class FrameIndexSet

java.lang.Object
jgromacs.data.FrameIndexSet

All Implemented Interfaces:
  `Cloneable`

public class FrameIndexSet extends Object implements Cloneable
Objects of this class represent a single frame index set

## Constructor Summary

Constructors
Constructor
Description
`FrameIndexSet()`
Constructs a new FrameIndexSet object
`FrameIndexSet(String name)`
Constructs a new FrameIndexSet object of a given name
`FrameIndexSet(ArrayList<Integer> list)`
Constructs a new FrameIndexSet object and loads data from an ArrayList
`FrameIndexSet(ArrayList<Integer> list, String name)`
Constructs a new FrameIndexSet object of a given name and loads data from an ArrayList
`FrameIndexSet(TreeSet<Integer> set)`
Constructs a new FrameIndexSet object and loads data from a TreeSet
`FrameIndexSet(TreeSet<Integer> set, String name)`
Constructs a new FrameIndexSet object of a given name and loads data from a TreeSet
`FrameIndexSet(FrameIndexSet set)`
Constructs a new FrameIndexSet object identical to a given FrameIndexSet

## Method Summary

Modifier and Type
Method
Description
`void`
`addFrame(int frame_index)`
Adds a new frame to the frame index set
`Object`
`clone()`
Returns an identical FrameIndexSet object
`boolean`
`equals(Object other)`
Returns true if this frame index set is identical to another
`ArrayList<Integer>`
`getAsArrayList()`
Returns frame index set as an ArrayList
`TreeSet<Integer>`
`getAsTreeSet()`
Returns frame index set as a TreeSet
`String`
`getName()`
Returns the name of frame index set
`int`
`getNumberOfFrames()`
Returns the number of frames in this frame index set
`int`
`hashCode()`
Returns hash code
`FrameIndexSet`
`intersect(FrameIndexSet other)`
Returns the intersection of this frame index set and another
`boolean`
`isFrameIn(int frame_index)`
Returns true if the frame index set contains a given frame index
`void`
`removeFrame(int frame_index)`
Removes a frame from the frame index set
`void`
`setName(String name)`
Sets the name of frame index set
`FrameIndexSet`
`subtract(FrameIndexSet other)`
Returns the subtraction of another frame index set from this frame index set
`String`
`toString()`
Returns the String representation of frame index set
`String`
`toStringInfo()`
Returns summary information about the frame index set
`FrameIndexSet`
`union(FrameIndexSet other)`
Returns the union of this frame index set and another

### Methods inherited from class java.lang.Object

`finalize, getClass, notify, notifyAll, wait, wait, wait`

## Constructor Details

### FrameIndexSet

public FrameIndexSet()
Constructs a new FrameIndexSet object

### FrameIndexSet

public FrameIndexSet(String name)
Constructs a new FrameIndexSet object of a given name

### FrameIndexSet

public FrameIndexSet(ArrayList<Integer> list)
Constructs a new FrameIndexSet object and loads data from an ArrayList

### FrameIndexSet

public FrameIndexSet(ArrayList<Integer> list, String name)
Constructs a new FrameIndexSet object of a given name and loads data from an ArrayList

### FrameIndexSet

public FrameIndexSet(TreeSet<Integer> set)
Constructs a new FrameIndexSet object and loads data from a TreeSet

### FrameIndexSet

public FrameIndexSet(TreeSet<Integer> set, String name)
Constructs a new FrameIndexSet object of a given name and loads data from a TreeSet

### FrameIndexSet

public FrameIndexSet(FrameIndexSet set)
Constructs a new FrameIndexSet object identical to a given FrameIndexSet

## Method Details

### getName

public String getName()
Returns the name of frame index set

Returns:
  Name of frame index set

### setName

public void setName(String name)
Sets the name of frame index set

### getAsTreeSet

public TreeSet<Integer> getAsTreeSet()
Returns frame index set as a TreeSet

Returns:
  frame index set as a TreeSet

### getAsArrayList

public ArrayList<Integer> 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

public FrameIndexSet intersect(FrameIndexSet other)
Returns the intersection of this frame index set and another

Returns:
  intersection of two frame index sets

### subtract

public FrameIndexSet subtract(FrameIndexSet other)
Returns the subtraction of another frame index set from this frame index set

Returns:
  subtraction of two frame index sets

### union

public FrameIndexSet union(FrameIndexSet other)
Returns the union of this frame index set and another

Returns:
  union of two frame index sets

### toString

public String toString()
Returns the String representation of frame index set

Overrides:
  `toString` in class `Object`
Returns:
  String representation

### toStringInfo

public String toStringInfo()
Returns summary information about the frame index set

Returns:
  summary information

### equals

public boolean equals(Object other)
Returns true if this frame index set is identical to another

Overrides:
  `equals` in class `Object`

### hashCode

public int hashCode()
Returns hash code

Overrides:
  `hashCode` in class `Object`

### clone

public Object clone()
Returns an identical FrameIndexSet object

Overrides:
  `clone` in class `Object`
Returns:
  clone of the frame index set