001/*-
002 * Copyright 2015, 2016 Diamond Light Source Ltd.
003 *
004 * All rights reserved. This program and the accompanying materials
005 * are made available under the terms of the Eclipse Public License v1.0
006 * which accompanies this distribution, and is available at
007 * http://www.eclipse.org/legal/epl-v10.html
008 */
009
010package org.eclipse.january.dataset;
011
012import java.util.Date;
013
014/**
015 * Interface for a dataset containing {@link Date}s.
016 */
017public interface DateDataset extends Dataset {
018        /**
019         * Get the first date. The dataset must not be null
020         * @return date
021         * @since 2.0
022         */
023        public Date getDate();
024        
025
026        /**
027         * Get the date at index i. The dataset must be 1D
028         * @param i position in first dimension
029         * @return date
030         */
031        public Date getDate(final int i);
032        
033        /**
034         * Get the date at index i, j. The dataset must be 2D
035         * @param i position in first dimension
036         * @param j position in second dimension
037         * @return date
038         */
039        public Date getDate(final int i, final int j);
040        
041        /**
042         * Get the date at given indices
043         * @param pos position
044         * @return date
045         */
046        public Date getDate(final int... pos);
047        
048        /**
049         * Get the date at the given absolute index. See warning for {@link Dataset} interface.
050         * @param index aboslute index
051         * @return date
052         */
053        public Date getDateAbs(final int index);
054}