Joda System API

org.joda.property.impl.type
Class DefaultLongPrimitiveProperty

java.lang.Object
  |
  +--org.joda.property.impl.AbstractModelElement
        |
        +--org.joda.property.impl.AbstractProperty
              |
              +--org.joda.property.impl.type.AbstractNumericProperty
                    |
                    +--org.joda.property.impl.type.AbstractLongProperty
                          |
                          +--org.joda.property.impl.type.DefaultLongPrimitiveProperty
All Implemented Interfaces:
java.lang.Comparable, DataProperty, InitializableProperty, LongPrimitiveProperty, ModelElement, NumericProperty, Property, Property.Internal, java.io.Serializable

public class DefaultLongPrimitiveProperty
extends AbstractLongProperty
implements LongPrimitiveProperty

Default implementation of a primitive long property.

Data is stored in the associated PropertyData object as a Long object. This is immutable so can be directly returned.

Author:
Stephen Colebourne
See Also:
Serialized Form

Nested Class Summary
 
Nested classes inherited from class org.joda.property.Property
Property.Internal
 
Field Summary
 
Fields inherited from interface org.joda.property.type.LongPrimitiveProperty
DEFAULT_TYPE
 
Constructor Summary
DefaultLongPrimitiveProperty()
          Constructor
 
Method Summary
 long get()
          Get the property's value as a long.
protected  java.lang.Number getInternal()
          Get the value from the data store
 java.lang.Class getPropertyType()
          Get the type of the property - Long.
protected  void setInternal(java.lang.Number newValue)
          Set the value to the data store
 
Methods inherited from class org.joda.property.impl.type.AbstractLongProperty
add, add, add, compareTo, convertObjectToLong, divideBy, divideBy, divideBy, multiplyBy, multiplyBy, multiplyBy, negate, set, set, set, subtract, subtract, subtract, toBigDecimal, toLong
 
Methods inherited from class org.joda.property.impl.type.AbstractNumericProperty
compareTo, compareTo, doubleValue, equals, equals, floatValue, intValue, isGreaterThan, isGreaterThan, isGreaterThan, isLessThan, isLessThan, isLessThan, longValue, toDouble, toFloat, toInteger, toNumber, toObject
 
Methods inherited from class org.joda.property.impl.AbstractProperty
addPropertyChangeListener, bean, checkArgumentNotNull, checkModifiable, checkValueNotNull, checkValueNotNull, cloneDeep, convertObject, createClonedProperty, data, equals, equalsValue, firePropertyChange, firePropertyChange, getContentName, getContentType, getPropertyName, getThis, hashCode, initBeanCreated, initPropertyCreated, isModifiable, isNull, isReadOnly, populateClonedProperty, removePropertyChangeListener, setModifiable, setReadOnly, toDataString, toString
 
Methods inherited from class org.joda.property.impl.AbstractModelElement
getAttribute, getAttributeCount, getAttributeMap, setAttribute
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.joda.property.type.NumericProperty
add, add, add, compareTo, compareTo, divideBy, divideBy, divideBy, doubleValue, equals, equals, floatValue, intValue, isGreaterThan, isGreaterThan, isGreaterThan, isLessThan, isLessThan, isLessThan, longValue, multiplyBy, multiplyBy, multiplyBy, negate, set, set, subtract, subtract, subtract, toBigDecimal, toDouble, toFloat, toInteger, toLong, toNumber
 
Methods inherited from interface org.joda.property.type.DataProperty
toDataString
 
Methods inherited from interface org.joda.property.Property
addPropertyChangeListener, bean, equals, equalsValue, firePropertyChange, getContentName, getContentType, getPropertyName, hashCode, isModifiable, isNull, isReadOnly, removePropertyChangeListener, set, setModifiable, setReadOnly, toObject, toString
 
Methods inherited from interface org.joda.property.ModelElement
getAttribute, getAttributeCount, getAttributeMap, setAttribute
 
Methods inherited from interface java.lang.Comparable
compareTo
 

Constructor Detail

DefaultLongPrimitiveProperty

public DefaultLongPrimitiveProperty()
Constructor

Method Detail

getPropertyType

public java.lang.Class getPropertyType()
Get the type of the property - Long.

Specified by:
getPropertyType in interface Property
Returns:
the property type

get

public long get()
Description copied from interface: LongPrimitiveProperty
Get the property's value as a long.

Specified by:
get in interface LongPrimitiveProperty
Returns:
the property value as a long
See Also:
LongPrimitiveProperty.get()

getInternal

protected java.lang.Number getInternal()
Description copied from class: AbstractNumericProperty
Get the value from the data store

Overrides:
getInternal in class AbstractNumericProperty
See Also:
AbstractNumericProperty.getInternal()

setInternal

protected void setInternal(java.lang.Number newValue)
Description copied from class: AbstractNumericProperty
Set the value to the data store

Overrides:
setInternal in class AbstractNumericProperty
See Also:
AbstractNumericProperty.setInternal(Number)

Joda System API

Copyright © 2001-2003 Stephen Colebourne. All Rights Reserved.