gov.lbl.genome.common.features
Class ChromSegments

java.lang.Object
  extended by java.util.AbstractCollection<E>
      extended by java.util.AbstractList<E>
          extended by java.util.Vector
              extended by gov.lbl.genome.common.features.ChromSegments
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, java.lang.Iterable, java.util.Collection, java.util.List, java.util.RandomAccess

public class ChromSegments
extends java.util.Vector

Title: ChromSegments

Description: Add some segment functionality

Copyright: Copyright (c) 2002 Ernst Orlando Lawrence Berkeley National Laboratory

Company: LBNL

See Also:
Serialized Form

Field Summary
 
Fields inherited from class java.util.Vector
capacityIncrement, elementCount, elementData
 
Fields inherited from class java.util.AbstractList
modCount
 
Constructor Summary
ChromSegments()
          ChromSegments
ChromSegments(int size)
          ChromSegments
 
Method Summary
 void Add_ChromSegment(ChromSegment reg)
          Add ChromSegment
 void Add_ChromSegment(ChromSegment reg, long start, long end)
          Add ChromSegment
 int Count_Overlapped(ChromSegments other)
           
 void Decrement_All(int n)
          shift all segments
 ChromSegments Difference(ChromSegments other)
          return Difference of two segment collections
 ChromSegment Get_ChromSegment(int n)
          Get ChromSegment
 void Increment_All(int n)
          shift all segments
 ChromSegments MergeWith(ChromSegments other)
          return new collection, combined from 2 collections
 ChromSegments Overlap(ChromSegments other)
          return Overlap of two collections
 java.lang.String Overlapped()
           
 ChromSegment removeChromSegment(int index)
          remove ChromSegment in the position
 void Set_ChromSegment(ChromSegment reg, int n)
          Set ChromSegment
 void Sort()
           
 java.lang.String toString()
           
 ChromSegments Union(ChromSegments other)
          return Union of two segment collections
 
Methods inherited from class java.util.Vector
add, add, addAll, addAll, addElement, capacity, clear, clone, contains, containsAll, copyInto, elementAt, elements, ensureCapacity, equals, firstElement, get, hashCode, indexOf, indexOf, insertElementAt, isEmpty, lastElement, lastIndexOf, lastIndexOf, remove, remove, removeAll, removeAllElements, removeElement, removeElementAt, removeRange, retainAll, set, setElementAt, setSize, size, subList, toArray, toArray, trimToSize
 
Methods inherited from class java.util.AbstractList
iterator, listIterator, listIterator
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.List
iterator, listIterator, listIterator
 

Constructor Detail

ChromSegments

public ChromSegments()
ChromSegments


ChromSegments

public ChromSegments(int size)
ChromSegments

Parameters:
size - int
Method Detail

removeChromSegment

public ChromSegment removeChromSegment(int index)
remove ChromSegment in the position

Parameters:
index - int
Returns:
ChromSegment

Add_ChromSegment

public void Add_ChromSegment(ChromSegment reg)
Add ChromSegment

Parameters:
reg - ChromSegment

Add_ChromSegment

public void Add_ChromSegment(ChromSegment reg,
                             long start,
                             long end)
Add ChromSegment

Parameters:
reg - ChromSegment
start - long
end - long

Get_ChromSegment

public ChromSegment Get_ChromSegment(int n)
Get ChromSegment

Parameters:
n - int
Returns:
ChromSegment

Set_ChromSegment

public void Set_ChromSegment(ChromSegment reg,
                             int n)
Set ChromSegment

Parameters:
reg - ChromSegment
n - int

toString

public java.lang.String toString()
Overrides:
toString in class java.util.Vector

Sort

public void Sort()

Difference

public ChromSegments Difference(ChromSegments other)
return Difference of two segment collections

Parameters:
other - ChromSegments
Returns:
ChromSegments

Overlap

public ChromSegments Overlap(ChromSegments other)
return Overlap of two collections

Parameters:
other - ChromSegments
Returns:
ChromSegments

Overlapped

public java.lang.String Overlapped()

Union

public ChromSegments Union(ChromSegments other)
return Union of two segment collections

Parameters:
other - ChromSegments
Returns:
ChromSegments

MergeWith

public ChromSegments MergeWith(ChromSegments other)
return new collection, combined from 2 collections

Parameters:
other - ChromSegments
Returns:
ChromSegments

Count_Overlapped

public int Count_Overlapped(ChromSegments other)

Decrement_All

public void Decrement_All(int n)
shift all segments

Parameters:
n - int

Increment_All

public void Increment_All(int n)
shift all segments

Parameters:
n - int