xmlBlaster 2.1.0 API

org.xmlBlaster.util.property
Class PropLong

java.lang.Object
  extended by org.xmlBlaster.util.property.PropEntry
      extended by org.xmlBlaster.util.property.PropLong
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable

public final class PropLong
extends PropEntry
implements java.io.Serializable, java.lang.Cloneable

Base class for the various property data type implementations.

Author:
xmlBlaster@marcelruff.info
See Also:
Serialized Form

Field Summary
private  long value
           
private  long valueDefault
           
 
Fields inherited from class org.xmlBlaster.util.property.PropEntry
CREATED_BY_CMDLINE, CREATED_BY_DEFAULT, CREATED_BY_JVMENV, CREATED_BY_PROPFILE, CREATED_BY_SETTER, creationOrigin, propName, SEP
 
Constructor Summary
PropLong(long value)
          Constructor for the default value
PropLong(java.lang.String propName, long value)
           
 
Method Summary
 java.lang.Object clone()
          Returns a shallow clone, you can change safely all basic or immutable types like boolean, String, int.
 long getDefaultValue()
           
 java.lang.String getTypeString()
           
 long getValue()
           
 java.lang.String getValueString()
           
static void main(java.lang.String[] args)
          java org.xmlBlaster.util.property.PropLong
 void setDefaultValue(long value)
          Overwrite the default value given to the constructor.
 void setValue(long value)
          Overwrites any default or environment settings.
 void setValue(long value, int creationOrigin)
           
 void setValue(java.lang.String value, int creationOrigin)
           
 
Methods inherited from class org.xmlBlaster.util.property.PropEntry
isDefault, isModified, isSet, setCreationOrigin, setFromEnv, setFromEnv, setFromEnv, toString, toXml, toXml
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

valueDefault

private long valueDefault

value

private long value
Constructor Detail

PropLong

public PropLong(long value)
Constructor for the default value


PropLong

public PropLong(java.lang.String propName,
                long value)
Method Detail

getTypeString

public final java.lang.String getTypeString()
Specified by:
getTypeString in class PropEntry
Returns:
"long"

getValueString

public final java.lang.String getValueString()
Specified by:
getValueString in class PropEntry
Returns:
The value in String form

setValue

public void setValue(long value)
Overwrites any default or environment settings. Used by clients to set hardcoded values or by SAX parser if enforced by XML


setValue

public void setValue(java.lang.String value,
                     int creationOrigin)
Specified by:
setValue in class PropEntry
Parameters:
The - new value as String type, will be converted to native type
creationOrigin - e.g. PropEntry.CREATED_BY_JVMENV

setValue

public void setValue(long value,
                     int creationOrigin)
Parameters:
the - new value to use
creationOrigin - e.g. PropEntry.CREATED_BY_JVMENV

getValue

public long getValue()

setDefaultValue

public void setDefaultValue(long value)
Overwrite the default value given to the constructor.


getDefaultValue

public long getDefaultValue()

clone

public java.lang.Object clone()
Returns a shallow clone, you can change safely all basic or immutable types like boolean, String, int.

Overrides:
clone in class PropEntry

main

public static void main(java.lang.String[] args)
java org.xmlBlaster.util.property.PropLong


xmlBlaster 2.1.0 API

Copyright © 1999-2011 The xmlBlaster.org contributers.