com.rabbitmq.jms.parse.Multiples Maven / Gradle / Ivy
The newest version!
/* Copyright (c) 2013-2023 Broadcom. All Rights Reserved. The term "Broadcom" refers to Broadcom Inc. and/or its subsidiaries. */
package com.rabbitmq.jms.parse;
public interface Multiples {
static class Pair {
private final L l;
private final R r;
public Pair(L l, R r) { this.l = l ; this.r = r; }
public L left() { return this.l; }
public R right() { return this.r; }
}
static class Triple {
private final Pair> p;
public Triple(F f, S s, T t) { this.p=new Pair>(f, new Pair(s, t)); }
public F first() { return this.p.left(); }
public S second() { return this.p.right().left(); }
public T third() { return this.p.right().right(); }
}
static class List {
private final Pair> n;
public List() { this.n = null; }
public List(E e, List t) { this.n=new Pair>(e, t); }
public boolean isEmpty() { return (this.n == null); }
public E head() { return this.n.left(); }
public List tail() { return this.n.right(); }
}
}