eu.planets_project.services.datatypes
Class Property.Builder

java.lang.Object
  extended by eu.planets_project.services.datatypes.Property.Builder
Enclosing class:
Property

public static final class Property.Builder
extends java.lang.Object

Builder to create property instances with optional attributes.


Constructor Summary
Property.Builder(Property p)
          Create a new property by cloning and existing one.
Property.Builder(java.net.URI uri)
           
 
Method Summary
 Property build()
           
 Property.Builder description(java.lang.String description)
           
 Property.Builder name(java.lang.String name)
           
 Property.Builder type(java.lang.String type)
           
 Property.Builder unit(java.lang.String unit)
           
 Property.Builder value(java.lang.String value)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Property.Builder

public Property.Builder(java.net.URI uri)
Parameters:
uri - The property id
Throws:
java.lang.IllegalArgumentException - if the given URI is null

Property.Builder

public Property.Builder(Property p)
Create a new property by cloning and existing one.

Parameters:
p - The property to clone into this builder.
Method Detail

name

public Property.Builder name(java.lang.String name)
Parameters:
name - The property name
Returns:
This builder, for cascaded calls

value

public Property.Builder value(java.lang.String value)
Parameters:
value - The property value
Returns:
This builder, for cascaded calls

description

public Property.Builder description(java.lang.String description)
Parameters:
description - The property description
Returns:
This builder, for cascaded calls

unit

public Property.Builder unit(java.lang.String unit)
Parameters:
unit - The property unit
Returns:
This builder, for cascaded calls

type

public Property.Builder type(java.lang.String type)
Parameters:
type - The property type
Returns:
This builder, for cascaded calls

build

public Property build()
Returns:
The finished immutable property instance


Copyright © 2007-2010 The Planets Consortium. All Rights Reserved.