org.crsh.cmdline.spi
Class Value

java.lang.Object
  extended by org.crsh.cmdline.spi.Value
Direct Known Subclasses:
Path

public abstract class Value
extends Object

A typed string, this class should be extended to provide meta information about a string and provide type safety. This class is immutable and so should be its subclasses.

Version:
$Revision$
Author:
Julien Viet

Constructor Summary
Value(String string)
          The only constructors that accepts a string.
 
Method Summary
 boolean equals(Object obj)
           
 String getString()
          Returns the string value.
 int hashCode()
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Value

public Value(String string)
      throws NullPointerException
The only constructors that accepts a string.

Parameters:
string - the string value
Throws:
NullPointerException - if the string is null
Method Detail

hashCode

public int hashCode()
Overrides:
hashCode in class Object

equals

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

getString

public final String getString()
Returns the string value.

Returns:
the string value

toString

public final String toString()
Overrides:
toString in class Object


Copyright © 2011 eXo Platform SAS. All Rights Reserved.