ref_send API 2.17
defensive programming in Java

org.ref_send.scope
Class Scope<T>

java.lang.Object
  extended by org.ref_send.scope.Scope<T>
Type Parameters:
T - nominal type
All Implemented Interfaces:
java.io.Serializable, Selfless

public class Scope<T>
extends java.lang.Object
implements Selfless, java.io.Serializable

A { name : value } record.

See Also:
Serialized Form

Field Summary
 Layout<T> meta
          structural type
 ConstArray<?> values
          each corresponding value
 
Method Summary
 boolean equals(java.lang.Object o)
          Is the given object equal to this one?
<R> R
get(java.lang.String name)
          Gets the corresponding value.
 int hashCode()
          Calculates the hash code.
static
<T> Scope<T>
make(Layout<T> meta, ConstArray<?> values)
          Constructs an instance.
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

meta

public final Layout<T> meta
structural type


values

public final ConstArray<?> values
each corresponding value

Method Detail

make

public static <T> Scope<T> make(Layout<T> meta,
                                ConstArray<?> values)
Constructs an instance.

Parameters:
meta - meta
values - values

equals

public boolean equals(java.lang.Object o)
Is the given object equal to this one?

Overrides:
equals in class java.lang.Object
Parameters:
o - compared to object
Returns:
true if equal, else false

hashCode

public int hashCode()
Calculates the hash code.

Specified by:
hashCode in interface Selfless
Overrides:
hashCode in class java.lang.Object

get

public <R> R get(java.lang.String name)
Gets the corresponding value.

Parameters:
name - name to lookup
Returns:
corresponding value, or null if none

ref_send API 2.17
defensive programming in Java

Submit a bug or feature, or get help

Copyright 1998-2009 Waterken Inc. under the terms of the MIT X license.