net.officefloor.building.command.parameters
Class AbstractOfficeFloorCommandParameter

java.lang.Object
  extended by net.officefloor.building.command.parameters.AbstractOfficeFloorCommandParameter
All Implemented Interfaces:
OfficeFloorCommandParameter
Direct Known Subclasses:
AbstractMultiplePathsOfficeFloorCommandParameter, AbstractSingleValueOfficeFloorCommandParameter, ArtifactReferencesOfficeFloorCommandParameter

public abstract class AbstractOfficeFloorCommandParameter
extends Object
implements OfficeFloorCommandParameter

Abstract OfficeFloorCommandParameter.

Author:
Daniel Sagenschneider

Constructor Summary
AbstractOfficeFloorCommandParameter(String name, String shortName, String description, boolean isRequireValue)
          Initiate.
 
Method Summary
 String getDescription()
          Obtains a description for this OfficeFloorCommandParameter.
 String getName()
           Obtains the name of this OfficeFloorCommandParameter.
 String getShortName()
           Provides an optional short name for easier typing.
 boolean isRequireValue()
           Flags if this OfficeFloorCommandParameter requires a value.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface net.officefloor.building.command.OfficeFloorCommandParameter
addValue
 

Constructor Detail

AbstractOfficeFloorCommandParameter

public AbstractOfficeFloorCommandParameter(String name,
                                           String shortName,
                                           String description,
                                           boolean isRequireValue)
Initiate.

Parameters:
name - Name.
shortName - Short name.
description - Description.
isRequireValue - Flag indicating if value required.
Method Detail

getName

public String getName()
Description copied from interface: OfficeFloorCommandParameter

Obtains the name of this OfficeFloorCommandParameter.

This would be for example help for help.

Specified by:
getName in interface OfficeFloorCommandParameter
Returns:
Name.

getShortName

public String getShortName()
Description copied from interface: OfficeFloorCommandParameter

Provides an optional short name for easier typing.

This would be for example h for help.

Specified by:
getShortName in interface OfficeFloorCommandParameter
Returns:
Short name or null if no short name.

getDescription

public String getDescription()
Description copied from interface: OfficeFloorCommandParameter
Obtains a description for this OfficeFloorCommandParameter.

Specified by:
getDescription in interface OfficeFloorCommandParameter
Returns:
Description for this OfficeFloorCommandParameter.

isRequireValue

public boolean isRequireValue()
Description copied from interface: OfficeFloorCommandParameter

Flags if this OfficeFloorCommandParameter requires a value.

Should this return false then OfficeFloorCommandParameter.addValue(String) will be invoked with a null value. Also the OfficeFloorCommandParser will not expect a value following the option.

Specified by:
isRequireValue in interface OfficeFloorCommandParameter
Returns:
true if requires value.


Copyright © 2005-2013. All Rights Reserved.