com.clarkparsia.pellet.util
Class Option<V>

java.lang.Object
  extended by com.clarkparsia.pellet.util.Option<V>

public class Option<V>
extends java.lang.Object

Represents a configuration option. A configuration option is used as a key to get and set values from a Options structure. In addition, an option has a predefined default value.

Author:
Evren Sirin

Method Summary
<T> Option<T>
create(java.lang.String name)
          Creates an option with the given name and null default value.
<T> Option<T>
create(java.lang.String name, T defaultValue)
          Creates an option with the given name and default value.
 boolean equals(java.lang.Object other)
           
 V getDefaultValue()
          Returns the default value for this option.
 int hashCode()
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Method Detail

create

public <T> Option<T> create(java.lang.String name)
Creates an option with the given name and null default value.


create

public <T> Option<T> create(java.lang.String name,
                            T defaultValue)
Creates an option with the given name and default value.


getDefaultValue

public V getDefaultValue()
Returns the default value for this option.


hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

equals

public boolean equals(java.lang.Object other)
Overrides:
equals in class java.lang.Object

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object


Copyright 2010 Clark & Parsia, LLC. All Rights Reserved.