package p4a; public class TableauStd implements Structure { private Object[] tableau; public TableauStd(Object[] tableau) { this.tableau = tableau; } @Override public void ajout(Object element, int position) { throw new UnsupportedOperationException("ajout : operation non supportee"); } @Override public void suppression(int position) { throw new UnsupportedOperationException("suppression : operation non supportee"); } @Override public Object acces(int position) { if (position > tableau.length || position < 0) { throw new IllegalArgumentException("acces : position incorecte"); } return tableau[position]; } }