org.jomc.sequences
Class Sequence

Package class diagram package Sequence
java.lang.Object
  extended by org.jomc.sequences.Sequence
All Implemented Interfaces:
Serializable, Cloneable, Comparable<Sequence>

@Generated(value="org.jomc.tools.SourceFileProcessor 1.0",
           comments="See http://jomc.sourceforge.net/jomc/1.0/jomc-tools")
public class Sequence
extends Object
implements Comparable<Sequence>, Cloneable, Serializable

Sequence of numbers.

Version:
$Id: Sequence.java 2244 2010-06-29 07:58:09Z schulte2005 $
Author:
Christian Schulte 1.0
See Also:
Serialized Form

Field Summary
Modifier and Type Field and Description
static String PROP_INCREMENT
          Constant for the name of property increment.
static String PROP_MAXIMUM
          Constant for the name of property maximum.
static String PROP_MINIMUM
          Constant for the name of property minimum.
static String PROP_NAME
          Constant for the name of property name.
static String PROP_VALUE
          Constant for the name of property value.
 
Constructor Summary
Constructor and Description
Sequence()
          Creates a new Sequence instance.
 
Method Summary
Modifier and Type Method and Description
 Sequence clone()
          Creates and returns a copy of this object.
 int compareTo(Sequence s)
          Compares this sequence with the specified sequence for order.
 boolean equals(Object o)
          Indicates whether some other object is equal to this one by comparing the values of properties name and revision.
 long getDate()
          Gets the date of the revision of the entity.
 long getIncrement()
          Gets the delta to add to the value of property value for the next value in the sequence.
 long getMaximum()
          Gets the maximum value of property value.
 long getMinimum()
          Gets the minimum value of property value.
 String getName()
          Gets the logical name of the sequence.
 long getRevision()
          Gets the revision of the entity.
 long getValue()
          Gets the current value of the sequence.
 int hashCode()
          Returns a hash code value for this object.
 void setIncrement(long value)
          Sets the delta to add to the value of property value for the next value in the sequence.
 void setMaximum(long value)
          Sets the maximum value of property value.
 void setMinimum(long value)
          Sets the minimum value of property value.
 void setName(String value)
          Sets the logical name of the sequence.
 void setValue(long value)
          Sets the current value of the sequence.
 String toString()
          Returns a string representation of the object.
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

PROP_NAME

public static final String PROP_NAME
Constant for the name of property name.

See Also:
Constant Field Values

PROP_MINIMUM

public static final String PROP_MINIMUM
Constant for the name of property minimum.

See Also:
Constant Field Values

PROP_MAXIMUM

public static final String PROP_MAXIMUM
Constant for the name of property maximum.

See Also:
Constant Field Values

PROP_INCREMENT

public static final String PROP_INCREMENT
Constant for the name of property increment.

See Also:
Constant Field Values

PROP_VALUE

public static final String PROP_VALUE
Constant for the name of property value.

See Also:
Constant Field Values
Constructor Detail

Sequence

@Generated(value="org.jomc.tools.SourceFileProcessor 1.0",
           comments="See http://jomc.sourceforge.net/jomc/1.0/jomc-tools")
public Sequence()
Creates a new Sequence instance.

Method Detail

getRevision

public long getRevision()
Gets the revision of the entity.

Returns:
The revision of the entity.

getDate

public long getDate()
Gets the date of the revision of the entity.

Returns:
The date of the revision of the entity.

getName

public String getName()
Gets the logical name of the sequence.

Returns:
The logical name of the sequence.

setName

public void setName(String value)
Sets the logical name of the sequence.

Parameters:
value - The new logical name of the sequence.

getMinimum

public long getMinimum()
Gets the minimum value of property value.

Returns:
The minimum value of property value.

setMinimum

public void setMinimum(long value)
Sets the minimum value of property value.

Parameters:
value - The new minimum value of property value.

getMaximum

public long getMaximum()
Gets the maximum value of property value.

Returns:
The maximum value of property value.

setMaximum

public void setMaximum(long value)
Sets the maximum value of property value.

Parameters:
value - The new maximum value of property value.

getIncrement

public long getIncrement()
Gets the delta to add to the value of property value for the next value in the sequence.

Returns:
The the delta to add to the value of property value for the next value in the sequence.

setIncrement

public void setIncrement(long value)
Sets the delta to add to the value of property value for the next value in the sequence.

Parameters:
value - The new delta to add to the value of property value for the next value in the sequence.

getValue

public long getValue()
Gets the current value of the sequence.

Returns:
The current value of the sequence.

setValue

public void setValue(long value)
Sets the current value of the sequence.

Parameters:
value - The current value of the sequence.

compareTo

public int compareTo(Sequence s)
Compares this sequence with the specified sequence for order.

Returns a negative integer, zero, or a positive integer as this sequence is less than, equal to, or greater than the specified sequence.

Note:
This class has a natural ordering that is inconsistent with equals.

Specified by:
compareTo in interface Comparable<Sequence>
Parameters:
s - The sequence to be compared.
Returns:
A negative integer, zero, or a positive integer as this sequence is less than, equal to, or greater than the specified sequence.

clone

public Sequence clone()
Creates and returns a copy of this object.

Overrides:
clone in class Object
Returns:
A clone of this instance.

equals

public boolean equals(Object o)
Indicates whether some other object is equal to this one by comparing the values of properties name and revision.

Overrides:
equals in class Object
Parameters:
o - The reference object with which to compare.
Returns:
true if this object is the same as o; false otherwise.

hashCode

public int hashCode()
Returns a hash code value for this object.

Overrides:
hashCode in class Object
Returns:
A hash code value for this object.

toString

public String toString()
Returns a string representation of the object.

Overrides:
toString in class Object
Returns:
A string representation of the object.


Copyright © 2005-2010 The JOMC Project. All Rights Reserved.