org.crsh.cmdline.spi
Class Value

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

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

Nested Class Summary
static class Value.Properties
           
 
Field Summary
private  String string
          .
 
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
 

Field Detail

string

private final String string
.

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 © 2012 eXo Platform SAS. All Rights Reserved.