| Modifier and Type | Field and Description |
|---|---|
protected String[] |
members
The array of member names, initialized in Golo structure classes constructors.
|
| Constructor and Description |
|---|
GoloStruct()
Constructor that does nothing beyond calling
super(). |
| Modifier and Type | Method and Description |
|---|---|
abstract GoloStruct |
copy()
Makes a shallow copy.
|
abstract GoloStruct |
frozenCopy()
Makes a shallow frozen copy where any member value modification attempt will fail with an
IllegalStateException. |
abstract Object |
get(String member)
Gets a member value by name.
|
abstract boolean |
isFrozen()
Tells whether the instance is frozen or not.
|
Iterator<Tuple> |
iterator()
Provides an iterator over the structure.
|
Tuple |
members()
Gets the member names as a tuple of strings.
|
abstract GoloStruct |
set(String member,
Object value)
Sets a member value by name.
|
abstract Tuple |
values()
Gets the current values, in order of member declaration.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitforEach, spliteratorprotected String[] members
public GoloStruct()
super().public abstract boolean isFrozen()
true if frozen, false otherwise.public Tuple members()
public abstract Tuple values()
public abstract Object get(String member)
member - the member name.IllegalArgumentException - if there is no such member member.public abstract GoloStruct set(String member, Object value)
member - the member name.value - the value.IllegalArgumentException - if there is no such member member.public abstract GoloStruct copy()
public abstract GoloStruct frozenCopy()
IllegalStateException.Copyright © 2014 Institut National des Sciences Appliquées de Lyon (INSA-Lyon). All Rights Reserved.