edu.neu.ccs.demeterf.lib
Class Some<X>

java.lang.Object
  extended by edu.neu.ccs.demeterf.lib.Option<X>
      extended by edu.neu.ccs.demeterf.lib.Some<X>

public class Some<X>
extends Option<X>

Represents an Optional instance that exists.


Nested Class Summary
static class Some.just
           
 
Constructor Summary
Some(X just)
           
 
Method Summary
<Y> Option<Y>
apply(List.Map<X,Y> m)
          Apply a function to the contained object in this Option if it exists
 boolean equals(java.lang.Object o)
           
 X getJust()
           
 X inner()
          Get the inner instance that this Option contains
 boolean isSome()
          Does this Option exist?
 java.lang.String toString()
           
 
Methods inherited from class edu.neu.ccs.demeterf.lib.Option
none, some
 
Methods inherited from class java.lang.Object
getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Some

public Some(X just)
Method Detail

isSome

public boolean isSome()
Description copied from class: Option
Does this Option exist?

Specified by:
isSome in class Option<X>

inner

public X inner()
Description copied from class: Option
Get the inner instance that this Option contains

Specified by:
inner in class Option<X>

apply

public <Y> Option<Y> apply(List.Map<X,Y> m)
Description copied from class: Option
Apply a function to the contained object in this Option if it exists

Specified by:
apply in class Option<X>

equals

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

toString

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

getJust

public X getJust()