Guest User

Untitled

a guest
Dec 18th, 2017
97
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. public class NodeSet implements HasJsRepresentation {
  2.  
  3.     public int id;
  4.     public int x;
  5.     public int y;
  6.     public int[] nodes;
  7.  
  8.     public static NodeSet construct(final int id, final int[] nodes) {
  9.         NodeSet nodeSet = new NodeSet();
  10.         nodeSet.id = id;
  11.         nodeSet.nodes = nodes;
  12.         nodeSet.x=0;
  13.         nodeSet.y=0;
  14.         return nodeSet;
  15.     }
  16.  
  17.     @Override
  18.     public final JsPlainObj asJsPlainObj() {
  19.         return JsPlainObj.$jsPlainObj("id", id, "x", x, "y" ,y, "nodes",nodes);
  20.     }
  21.  
  22. }
RAW Paste Data