Esempio n. 1
0
 @SuppressWarnings("unchecked")
 @Override
 public IntervalAndSubIntervals<T> cloneShallow() {
   IntervalAndSubIntervals<T> clone = (IntervalAndSubIntervals<T>) super.cloneShallow();
   clone.reset();
   return clone;
 }
Esempio n. 2
0
  @SuppressWarnings("unchecked")
  @Override
  public IntervalAndSubIntervals<T> clone() {
    IntervalAndSubIntervals<T> copy = (IntervalAndSubIntervals<T>) super.clone();
    copy.reset();

    for (T m : this) {
      T mcopy = (T) m.clone();
      mcopy.setParent(copy);
      copy.add(mcopy);
    }

    return copy;
  }
Esempio n. 3
0
  /** Apply a variant. */
  @Override
  @SuppressWarnings("unchecked")
  public IntervalAndSubIntervals<T> apply(Variant variant) {
    if (!shouldApply(variant)) return this;

    IntervalAndSubIntervals<T> newMarker = (IntervalAndSubIntervals<T>) super.apply(variant);
    if (newMarker == null) return null;
    newMarker.reset();

    for (T m : this) {
      T mcopy = (T) m.apply(variant);

      // Do not add if interval is completely removed
      if (mcopy != null) {
        mcopy.setParent(newMarker);
        newMarker.add(mcopy);
      }
    }

    return newMarker;
  }
Esempio n. 4
0
 public IntervalAndSubIntervals(
     Marker parent, int start, int end, boolean strandMinus, String id) {
   super(parent, start, end, strandMinus, id);
   reset();
 }
Esempio n. 5
0
 public IntervalAndSubIntervals() {
   super();
   reset();
 }