File: HDF5StorageLayout.java

package info (click to toggle)
libsis-jhdf5-java 19.04.0%2Bdfsg-4
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 8,668 kB
  • sloc: java: 79,644; ansic: 18,986; sh: 309; makefile: 49; xml: 12
file content (33 lines) | stat: -rw-r--r-- 786 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
package ch.systemsx.cisd.hdf5;

import hdf.hdf5lib.HDF5Constants;

/**
 * The storage layout of a data set in the HDF5 file. Not applicable for attributes.
 * 
 * @author Bernd Rinn
 */
public enum HDF5StorageLayout
{
    COMPACT(HDF5Constants.H5D_COMPACT), CONTIGUOUS(HDF5Constants.H5D_CONTIGUOUS), CHUNKED(
            HDF5Constants.H5D_CHUNKED), NOT_APPLICABLE(-1);

    private int id;

    private HDF5StorageLayout(int id)
    {
        this.id = id;
    }

    static HDF5StorageLayout fromId(int id) throws IllegalArgumentException
    {
        for (HDF5StorageLayout layout : values())
        {
            if (layout.id == id)
            {
                return layout;
            }
        }
        throw new IllegalArgumentException("Illegal layout id " + id);
    }
}