Example usage for com.badlogic.gdx.utils JsonValue setPrev

List of usage examples for com.badlogic.gdx.utils JsonValue setPrev

Introduction

In this page you can find the example usage for com.badlogic.gdx.utils JsonValue setPrev.

Prototype

public void setPrev(JsonValue prev) 

Source Link

Usage

From source file:com.o2d.pkayjava.editor.data.migrations.migrators.VersionMigTo009.java

License:Apache License

private void setNewKeyToJson(JsonValue container, String newKey, String oldKey, JsonValue newVal) {
    JsonValue oldVal = container.get(oldKey);
    if (oldVal.prev != null)
        oldVal.prev.setNext(newVal);//  w ww. j av a 2 s .c o m
    if (oldVal.next != null)
        oldVal.next.setPrev(newVal);
    newVal.setPrev(oldVal.prev);
    newVal.setNext(oldVal.next);
    newVal.name = newKey;
}