public final void restoreState(State state) {if (state == null)  return;do {AttributeImpl targetImpl = attributeImpls.get(state.attribute.getClass());if (targetImpl == null) {throw new IllegalArgumentException("State contains AttributeImpl of type " +state.attribute.getClass().getName() + " that is not in in this AttributeSource");}state.attribute.copyTo(targetImpl);state = state.next;} while (state != null);}

public void RestoreState(State state){if (state == null){return;}do{if (!attributeImpls.ContainsKey(state.attribute.GetType())){throw new ArgumentException("State contains Attribute of type " + state.attribute.GetType().Name + " that is not in in this AttributeSource");}state.attribute.CopyTo(attributeImpls[state.attribute.GetType()]);state = state.next;} while (state != null);}
