@ALDParametrizedClass public class MTBLineSegment2DSet extends de.unihalle.informatik.Alida.operator.ALDData implements Cloneable, Iterable<MTBLineSegment2D>
MTBLineSegment2D
Modifier and Type | Field and Description |
---|---|
private String |
info
Information about this set of line segments.
|
protected Vector<MTBLineSegment2D> |
lineSegmentSet
The set of line segments.
|
Constructor and Description |
---|
MTBLineSegment2DSet()
Standard constructor.
|
Modifier and Type | Method and Description |
---|---|
boolean |
add(MTBLineSegment2D line)
Append a new segment (at the end) to the set of line segments.
|
void |
clear()
Remove all line segments from this set.
|
MTBLineSegment2DSet |
clone() |
MTBLineSegment2D |
elementAt(int i)
Get a specific line segment by index including a safety check.
|
MTBLineSegment2D |
get(int i)
Get a specific line segment by index.
|
String |
getInfo()
Get info string.
|
Iterator<MTBLineSegment2D> |
iterator() |
void |
remove(MTBLineSegment2D lineToRemove)
Delete the given lineobject from the set, if contained.
|
void |
removeElementAt(int i)
Delete the i-th segment from the set.
|
void |
setElementAt(MTBLineSegment2D line,
int i)
Replace the i-th line segment of the set.
|
void |
setInfo(String i)
Set info string of set.
|
int |
size()
Get the number of line segments in the set.
|
cloneProperties, getLocation, getProperty, getPropertyKeys, print, setLocation, setProperty
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
forEach, spliterator
@ALDClassParameter(label="Set of line segments") protected Vector<MTBLineSegment2D> lineSegmentSet
private String info
public MTBLineSegment2DSet clone()
public int size()
public String getInfo()
public void setInfo(String i)
i
- Info string.public void clear()
public MTBLineSegment2D get(int i)
i
- Index of desired segment.public MTBLineSegment2D elementAt(int i)
i
- Index of desired segment.public boolean add(MTBLineSegment2D line)
line
- Line segment to add.public void setElementAt(MTBLineSegment2D line, int i)
line
- New segment to put into set.i
- Index of segment to replace.public void removeElementAt(int i)
i
- Index of segment to remove.public void remove(MTBLineSegment2D lineToRemove)
If the line is contained multiple times in the set, the first occurence is removed.
lineToRemove
- Line object to remove.public Iterator<MTBLineSegment2D> iterator()
iterator
in interface Iterable<MTBLineSegment2D>
Copyright © 2010–2020 Martin Luther University Halle-Wittenberg, Institute of Computer Science, Pattern Recognition and Bioinformatics. All rights reserved.