com.vividsolutions.jump.util
Class Block

java.lang.Object
  extended by com.vividsolutions.jump.util.Block

public abstract class Block
extends java.lang.Object

Simply a chunk of code that can be passed around. Facilitates Smalltalk-like programming. Also useful as a "lexical closure" i.e. a chunk of code with variables having long lifetimes.

Typically only one of the #yield methods needs to be implemented. Which one depends on the context.


Constructor Summary
Block()
           
 
Method Summary
 java.lang.Object yield()
           
 java.lang.Object yield(java.lang.Object arg)
           
 java.lang.Object yield(java.lang.Object arg1, java.lang.Object arg2)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Block

public Block()
Method Detail

yield

public java.lang.Object yield(java.lang.Object arg1,
                              java.lang.Object arg2)

yield

public java.lang.Object yield(java.lang.Object arg)

yield

public java.lang.Object yield()