@Test public void serialize() throws IOException { final Var<Integer> object = Var.of("some_name", new Random().nextInt(100)); final byte[] data = IO.object.toByteArray(object); Assert.assertEquals(IO.object.fromByteArray(data), object); }
public static <T> Var<T> of(final String name, final int index) { return new Var<>(name, index); }
Var implements Op<T>, Comparable<Var<T>>, Serializable { public static <T> Var<T> of(final String name, final int index) { return new Var<>(name, index); } }
Var implements Op<T>, Comparable<Var<T>>, Serializable { public static <T> Var<T> of(final String name, final int index) { return new Var<>(name, index); } private  Var(final String name, final int index); }
Var implements Op<T>, Comparable<Var<T>>, Serializable { public static <T> Var<T> of(final String name, final int index) { return new Var<>(name, index); } private  Var(final String name, final int index); int index(); @Override String name(); @Override int arity(); @Override T apply(final T[] variables); @Override int compareTo(final Var<T> o); @Override int hashCode(); @Override boolean equals(final Object obj); @Override String toString(); static Var<T> of(final String name, final int index); static Var<T> of(final String name); static Var<T> parse(final String name); static void reindex(final TreeNode<Op<V>> tree); static void reindex(
		final TreeNode<Op<V>> tree,
		final Map<Var<V>, Integer> indexes
	); }
Var implements Op<T>, Comparable<Var<T>>, Serializable { public static <T> Var<T> of(final String name, final int index) { return new Var<>(name, index); } private  Var(final String name, final int index); int index(); @Override String name(); @Override int arity(); @Override T apply(final T[] variables); @Override int compareTo(final Var<T> o); @Override int hashCode(); @Override boolean equals(final Object obj); @Override String toString(); static Var<T> of(final String name, final int index); static Var<T> of(final String name); static Var<T> parse(final String name); static void reindex(final TreeNode<Op<V>> tree); static void reindex(
		final TreeNode<Op<V>> tree,
		final Map<Var<V>, Integer> indexes
	);  }