public static interface CodeList.Filter
Used by
CodeList.valueOf(Class, Filter)
to select codes matching an arbitrary
criterion.- Since:
- 2.3
- Departure from OGC/ISO abstract specification:
Addition of element not in the ISO/OGC specification
The innerCodeList.Filter
interface is not part of the OGC specification. It has been added becauseCodeList
is one of the few concrete classes in GeoAPI and there is a need to give some user control over the behavior of theCodeList
implementation.
-
Method Summary
-
Method Details
-
accept
Returnstrue
if the given code matches the criterion defined by this filter.- Parameters:
code
- The code to test.- Returns:
true
if the code matches the criterion.
-
codename
String codename()Returns the name of the code being looked for, ornull
if unknown. This method is invoked byCodeList.valueOf(Class, Filter)
if no code match the criterion defined by this filter. In such case, there is a choice:- If this method returns a non-null name, then a new code of that name is created.
- Otherwise, no new code is created and
CodeList.valueOf
returnsnull
.
- Returns:
- The name of the code being looked for, or
null
.
-