ucar.unidata.data.sounding
Class Link

java.lang.Object
  extended by ucar.unidata.data.sounding.Link
All Implemented Interfaces:
Comparable
Direct Known Subclasses:
RAOB.Contribution

public class Link
extends Object
implements Comparable

Provides support for conceptually linking two Link.End-s together.

Version:
$Id: Link.java,v 1.9 2006/12/01 20:42:43 jeffmc Exp $
Author:
Steven R. Emmerson

Nested Class Summary
static class Link.End
          Provides support for the end of a Link.
 
Constructor Summary
Link(Link.End end1, Link.End end2)
          Constructs.
 
Method Summary
 int compareTo(Object link)
          Compares one Link to another.
 Link.End getFirstEnd()
          Gets the first Link.End.
 Link.End getSecondEnd()
          Gets the second Link.End.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Link

public Link(Link.End end1,
            Link.End end2)
Constructs.

Parameters:
end1 - The first Link.End.
end2 - The second Link.End.
Method Detail

getFirstEnd

public Link.End getFirstEnd()
Gets the first Link.End.

Returns:
The first Link.End.

getSecondEnd

public Link.End getSecondEnd()
Gets the second Link.End.

Returns:
The second Link.End.

compareTo

public int compareTo(Object link)
Compares one Link to another. In comparing two Link-s, a major comparison is made between the first ends and then, if necessary, a minor comparison is made between the second ends.

Specified by:
compareTo in interface Comparable
Parameters:
link - The other Link.
Returns:
A number that is less that, equal to, or greater than zero depending on whether this Link is less than, equal to, or greater than the other Link, respectively.