@Override public byte type(String name) { final NodeState resolved = this._resolver.resolveState(this); if (resolved != null) { return resolved.getType(this._resolver.stringToHash(name, false)); } return -1; }
public NodeFactory factoryByCode(int code) { NodeDeclaration declaration = _nodeRegistry.declarationByHash(code); if (declaration != null) { return declaration.factory(); } return null; }
@Override public void setPropertyByIndex(long propIndex, byte propertyType, Object propertyValue) { _resolver.alignState(this).set(propIndex, propertyType, propertyValue); } }
@Override public Object get(String name) { final NodeState resolved = this._resolver.resolveState(this); if (resolved != null) { return resolved.get(this._resolver.stringToHash(name, false)); } return null; }
@Override public final Object getOrCreate(String propertyName, byte propertyType) { final NodeState preciseState = this._resolver.alignState(this); if (preciseState != null) { return preciseState.getOrCreate(this._resolver.stringToHash(propertyName, true), propertyType); } else { throw new RuntimeException(Constants.CACHE_MISS_ERROR); } }
@Override public void forceProperty(String propertyName, byte propertyType, Object propertyValue) { final long hashed = this._resolver.stringToHash(propertyName, true); final NodeState preciseState = this._resolver.alignState(this); if (preciseState != null) { preciseState.set(hashed, propertyType, propertyValue); } else { throw new RuntimeException(Constants.CACHE_MISS_ERROR); } }
@Override public Object getAt(int propIndex) { return _resolver.resolveState(this).get(propIndex); }
@Override public final long lastModification() { final NodeState state = this._resolver.resolveState(this); if (state != null) { return state.time(); } else { throw new RuntimeException(Constants.CACHE_MISS_ERROR); } }
@Override public byte typeAt(final int index) { final NodeState resolved = this._resolver.resolveState(this); if (resolved != null) { return resolved.getType(index); } return -1; }
@Override public final void rel(String relationName, final Callback<Node[]> callback) { relByIndex(this._resolver.stringToHash(relationName, false), callback); }
@Override public final <A extends Node> void travelInTime(final long targetTime, final Callback<A> callback) { _resolver.lookup(_world, targetTime, _id, callback); }
@Override public final Node setTimeSensitivity(long deltaTime, long offset) { _resolver.setTimeSensitivity(this, deltaTime, offset); return this; }
@Override public final long[] timeSensitivity() { return _resolver.getTimeSensitivity(this); }
@Override public void get(Buffer keys, Callback<Buffer> callback) { wrapped.get(keys, callback); }
@Override public void disconnect(Callback<Boolean> callback) { wrapped.disconnect(callback); }
@Override public synchronized final void each(final NodeStateCallback callBack) { for (int i = 0; i < _size; i++) { if (_v[i] != null) { callBack.on(_k[i], _type[i], _v[i]); } } }
@Override public byte type(String propertyName) { final NodeState resolved = this._resolver.resolveState(this); if (resolved != null) { return resolved.getType(this._resolver.stringToHash(propertyName, false)); } return -1; }
@Override public Object get(String propertyName) { final NodeState resolved = this._resolver.resolveState(this); if (resolved != null) { return resolved.get(this._resolver.stringToHash(propertyName, false)); } return null; }
@Override public Object getByIndex(long propIndex) { return _resolver.resolveState(this).get(propIndex); }
@Override public final long timeDephasing() { final NodeState state = this._resolver.resolveState(this); if (state != null) { return (this._time - state.time()); } else { throw new RuntimeException(Constants.CACHE_MISS_ERROR); } }