com.sonyericsson.hudson.plugins.metadata.model.values
Class NumberMetadataValue

java.lang.Object
  extended by com.sonyericsson.hudson.plugins.metadata.model.values.AbstractMetadataValue
      extended by com.sonyericsson.hudson.plugins.metadata.model.values.NumberMetadataValue
All Implemented Interfaces:
Metadata<MetadataValue>, MetadataValue, hudson.model.Describable<AbstractMetadataValue>, Serializable, Cloneable, Comparable<Object>

public class NumberMetadataValue
extends AbstractMetadataValue

Meta data containing a non-decimal number.

Author:
Robert Sandell <robert.sandell@sonyericsson.com>
See Also:
Serialized Form

Nested Class Summary
static class NumberMetadataValue.NumberMetaDataValueDescriptor
          Descriptor for NumberMetadataValues.
 
Nested classes/interfaces inherited from class com.sonyericsson.hudson.plugins.metadata.model.values.AbstractMetadataValue
AbstractMetadataValue.AbstractMetaDataValueDescriptor
 
Field Summary
 
Fields inherited from class com.sonyericsson.hudson.plugins.metadata.model.values.AbstractMetadataValue
name
 
Constructor Summary
NumberMetadataValue(String name, long value)
          Standard Constructor.
NumberMetadataValue(String name, String description, long value)
          Standard Constructor.
NumberMetadataValue(String name, String description, long value, boolean exposedToEnvironment)
          Standard Constructor.
 
Method Summary
 int compareTo(Object userValue)
           
 boolean equals(Object obj)
           
 hudson.model.Descriptor<AbstractMetadataValue> getDescriptor()
           
 Long getValue()
          Get the value.
 int hashCode()
           
 net.sf.json.JSONObject toJson()
          Convert this object into a JSON object.
 
Methods inherited from class com.sonyericsson.hudson.plugins.metadata.model.values.AbstractMetadataValue
addEnvironmentVariables, clone, getDescription, getEnvironmentName, getFullName, getFullName, getFullNameFrom, getFullPath, getName, getParent, isExposedToEnvironment, isGenerated, replacementOf, setDescription, setExposeToEnvironment, setGenerated, setName, setParent, toAbstractJson
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NumberMetadataValue

@DataBoundConstructor
public NumberMetadataValue(String name,
                                                String description,
                                                long value,
                                                boolean exposedToEnvironment)
Standard Constructor.

Parameters:
name - the name.
description - the description.
value - the value.
exposedToEnvironment - if this value should be exposed to the build as an environment variable.

NumberMetadataValue

public NumberMetadataValue(String name,
                           String description,
                           long value)
Standard Constructor.

Parameters:
name - the name.
description - the description.
value - the value.

NumberMetadataValue

public NumberMetadataValue(String name,
                           long value)
Standard Constructor.

Parameters:
name - the name.
value - the value.
Method Detail

getValue

public Long getValue()
Description copied from class: AbstractMetadataValue
Get the value.

Specified by:
getValue in interface Metadata<MetadataValue>
Overrides:
getValue in class AbstractMetadataValue
Returns:
the value.

toJson

public net.sf.json.JSONObject toJson()
Description copied from interface: MetadataValue
Convert this object into a JSON object.

Returns:
the JSON version.

getDescriptor

public hudson.model.Descriptor<AbstractMetadataValue> getDescriptor()

equals

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

hashCode

public int hashCode()
Overrides:
hashCode in class Object

compareTo

public int compareTo(Object userValue)


Copyright © 2004-2013. All Rights Reserved.