/** * Returns the spatial representation type that matches the given string, or returns a new one * if none match it. * * @param code The name of the code to fetch or to create. * @return A code matching the given name. */ public static SpatialRepresentationType valueOf(String code) { return valueOf(SpatialRepresentationType.class, code); } }
/** Returns the list of enumerations of the same kind than this enum. */ public SpatialRepresentationType[] family() { return values(); }
/** * Returns the SpatialRepresentationType that matches the given string, or returns a * new one if none match it. */ public static SpatialRepresentationType valueOf(String code) { if (code == null) { return null; } synchronized (VALUES) { Iterator iter = VALUES.iterator(); while (iter.hasNext()) { SpatialRepresentationType type = (SpatialRepresentationType) iter.next(); if (code.equalsIgnoreCase(type.name())) { return type; } } return new SpatialRepresentationType(code); } } }
/** * Returns the spatial representation type that matches the given string, or returns a * new one if none match it. More specifically, this methods returns the first instance for * which <code>{@linkplain #name() name()}.{@linkplain String#equals equals}(code)</code> * returns {@code true}. If no existing instance is found, then a new one is created for * the given name. * * @param code the name of the code to fetch or to create. * @return a code matching the given name. */ public static SpatialRepresentationType valueOf(String code) { return valueOf(SpatialRepresentationType.class, code); } }
/** * Returns the list of codes of the same kind than this code list element. * Invoking this method is equivalent to invoking {@link #values()}, except that * this method can be invoked on an instance of the parent {@code CodeList} class. * * @return all code {@linkplain #values() values} for this code list. */ @Override public SpatialRepresentationType[] family() { return values(); }
/** * Returns the spatial representation type that matches the given string, or returns a * new one if none match it. More specifically, this methods returns the first instance for * which <code>{@linkplain #name() name()}.{@linkplain String#equals equals}(code)</code> * returns {@code true}. If no existing instance is found, then a new one is created for * the given name. * * @param code the name of the code to fetch or to create. * @return a code matching the given name. */ public static SpatialRepresentationType valueOf(String code) { return valueOf(SpatialRepresentationType.class, code); } }
/** * Returns the list of codes of the same kind than this code list element. * Invoking this method is equivalent to invoking {@link #values()}, except that * this method can be invoked on an instance of the parent {@code CodeList} class. * * @return all code {@linkplain #values() values} for this code list. */ @Override public SpatialRepresentationType[] family() { return values(); }
/** * Returns the netCDF {@value ACDD#cdm_data_type} attribute value, or an empty set if none. */ @Override public Collection<SpatialRepresentationType> getSpatialRepresentationTypes() { return singleton(SpatialRepresentationType.valueOf(getUpperCase(ACDD.cdm_data_type))); }
/** * Returns the list of enumerations of the same kind than this enum. */ public /*{SpatialRepresentationType}*/ CodeList[] family() { return values(); }