org.graffiti.plugins.scripting.delegates
Class VectorDelegate

java.lang.Object
  extended by org.graffiti.plugins.scripting.delegate.ScriptingDelegate
      extended by org.graffiti.plugins.scripting.delegate.ReflectiveDelegate
          extended by org.graffiti.plugins.scripting.delegate.ObjectDelegate
              extended by org.graffiti.plugins.scripting.delegates.VectorDelegate
All Implemented Interfaces:
org.graffiti.plugins.scripting.delegate.Unwrappable<Point2D>

public class VectorDelegate
extends org.graffiti.plugins.scripting.delegate.ObjectDelegate
implements org.graffiti.plugins.scripting.delegate.Unwrappable<Point2D>

Author:
Andreas Gleißner

Field Summary
 
Fields inherited from class org.graffiti.plugins.scripting.delegate.ScriptingDelegate
UNDEFINED
 
Constructor Summary
VectorDelegate(org.graffiti.plugins.scripting.Scope scope)
           
VectorDelegate(org.graffiti.plugins.scripting.Scope scope, Map<Integer,Double> map)
           
VectorDelegate(org.graffiti.plugins.scripting.Scope scope, Number... values)
           
VectorDelegate(org.graffiti.plugins.scripting.Scope scope, Object[] array)
           
 
Method Summary
 VectorDelegate add(VectorDelegate... others)
           
 VectorDelegate clone()
           
 Object get(int index)
           
 Set<Integer> getIndices()
           
 boolean has(int index)
           
 VectorDelegate multiply(Number factor)
           
 Double norm()
           
 VectorDelegate normalize()
           
 void put(int index, Object value)
           
 VectorDelegate sub(VectorDelegate... others)
           
 String toString()
           
 Point2D unwrap()
           
 
Methods inherited from class org.graffiti.plugins.scripting.delegate.ObjectDelegate
createConstructor, createWrapper, get, getMemberInfo, getScope, has, put
 
Methods inherited from class org.graffiti.plugins.scripting.delegate.ReflectiveDelegate
addDynamicMemberInfo, delete, delete, getClassName, help
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

VectorDelegate

public VectorDelegate(org.graffiti.plugins.scripting.Scope scope)

VectorDelegate

public VectorDelegate(org.graffiti.plugins.scripting.Scope scope,
                      Map<Integer,Double> map)

VectorDelegate

public VectorDelegate(org.graffiti.plugins.scripting.Scope scope,
                      Number... values)

VectorDelegate

public VectorDelegate(org.graffiti.plugins.scripting.Scope scope,
                      Object[] array)
               throws org.graffiti.plugins.scripting.exceptions.ScriptingException
Throws:
org.graffiti.plugins.scripting.exceptions.ScriptingException
Method Detail

add

public VectorDelegate add(VectorDelegate... others)

sub

public VectorDelegate sub(VectorDelegate... others)

multiply

public VectorDelegate multiply(Number factor)

norm

public Double norm()

normalize

public VectorDelegate normalize()

get

public Object get(int index)
Overrides:
get in class org.graffiti.plugins.scripting.delegate.ReflectiveDelegate

has

public boolean has(int index)
Overrides:
has in class org.graffiti.plugins.scripting.delegate.ReflectiveDelegate

getIndices

public Set<Integer> getIndices()
Overrides:
getIndices in class org.graffiti.plugins.scripting.delegate.ReflectiveDelegate

put

public void put(int index,
                Object value)
Overrides:
put in class org.graffiti.plugins.scripting.delegate.ReflectiveDelegate

clone

public VectorDelegate clone()
Overrides:
clone in class Object

toString

public String toString()
Overrides:
toString in class Object

unwrap

public Point2D unwrap()
Specified by:
unwrap in interface org.graffiti.plugins.scripting.delegate.Unwrappable<Point2D>


Generated at 2012-05-30 11:01:25 PM CEST