Changeset 12776 in josm for trunk/src/org/openstreetmap/josm/tools/PlatformHook.java
- Timestamp:
- 2017-09-07T23:41:42+02:00 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/tools/PlatformHook.java
r12748 r12776 20 20 21 21 import org.openstreetmap.josm.Main; 22 import org.openstreetmap.josm.data.projection.datum.NTV2GridShiftFileWrapper; 22 23 import org.openstreetmap.josm.io.CertificateAmendment.CertAmend; 23 24 import org.openstreetmap.josm.tools.date.DateUtils; … … 29 30 */ 30 31 public interface PlatformHook { 32 33 /** 34 * Visitor to construct a PlatformHook from a given {@link Platform} object. 35 */ 36 public static final PlatformVisitor<PlatformHook> CONSTRUCT_FROM_PLATFORM = new PlatformVisitor<PlatformHook>() { 37 @Override 38 public PlatformHook visitUnixoid() { 39 return new PlatformHookUnixoid(); 40 } 41 42 @Override 43 public PlatformHook visitWindows() { 44 return new PlatformHookWindows(); 45 } 46 47 @Override 48 public PlatformHook visitOsx() { 49 return new PlatformHookUnixoid(); 50 } 51 }; 52 53 /** 54 * Get the platform corresponding to this platform hook. 55 * @return the platform corresponding to this platform hook 56 */ 57 Platform getPlatform(); 31 58 32 59 /** … … 231 258 * @since 11642 232 259 */ 233 List<File> getDefaultProj4NadshiftDirectories(); 260 default List<File> getDefaultProj4NadshiftDirectories() { 261 return getPlatform().accept(NTV2GridShiftFileWrapper.DEFAULT_PROJ4_NTV2_SHIFT_DIRS); 262 } 234 263 235 264 /**
Note:
See TracChangeset
for help on using the changeset viewer.
