barchart-udt-core
2.3.0-SNAPSHOT / 2013-05-13T01:37:38.485-0500

com.barchart.udt
Class LingerUDT

java.lang.Object
  extended by java.lang.Number
      extended by com.barchart.udt.LingerUDT
All Implemented Interfaces:
Serializable, Comparable<LingerUDT>

public class LingerUDT
extends Number
implements Comparable<LingerUDT>

See Also:
Serialized Form

Field Summary
static LingerUDT LINGER_ZERO
           
 
Constructor Summary
LingerUDT(int lingerSeconds)
          Default constructor.
 
Method Summary
 int compareTo(LingerUDT other)
           
 double doubleValue()
           
 boolean equals(Object otherLinger)
           
 float floatValue()
           
 int hashCode()
           
 int intValue()
           
 long longValue()
           
 String toString()
           
 
Methods inherited from class java.lang.Number
byteValue, shortValue
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

LINGER_ZERO

public static final LingerUDT LINGER_ZERO
Constructor Detail

LingerUDT

public LingerUDT(int lingerSeconds)
          throws IllegalArgumentException
Default constructor. NOTE: linger value is "u_short" on windows and "int" on linux:
Windows: linger Structure on Windows
Linux: GCC Socket-Level Options
Therefore select smallest range: 0 <= linger <= 65535

Parameters:
lingerSeconds - the seconds to linger; "0" means "do not linger"
Throws:
IllegalArgumentException - when lingerSeconds is out of range
Method Detail

doubleValue

public double doubleValue()
Specified by:
doubleValue in class Number

floatValue

public float floatValue()
Specified by:
floatValue in class Number

intValue

public int intValue()
Specified by:
intValue in class Number

longValue

public long longValue()
Specified by:
longValue in class Number

equals

public boolean equals(Object otherLinger)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

compareTo

public int compareTo(LingerUDT other)
Specified by:
compareTo in interface Comparable<LingerUDT>

toString

public String toString()
Overrides:
toString in class Object

barchart-udt-core
2.3.0-SNAPSHOT / 2013-05-13T01:37:38.485-0500

Copyright © 2009-2013 Barchart, Inc.. All Rights Reserved.