Subversion Repository Public Repository

litesoft

Diff Revisions 960 vs 961 for /trunk/DeviceDesktopTest/src/org/litesoft/language/server/MasterUnvalidatedAccessorPropertyFile.java

Diff revisions: vs.
  @@ -10,64 +10,56 @@
10 10 /**
11 11 *
12 12 */
13 - public class MasterUnvalidatedAccessorPropertyFile implements MasterUnvalidatedAccessor
14 - {
13 + public class MasterUnvalidatedAccessorPropertyFile implements MasterUnvalidatedAccessor {
15 14
16 15 /**
17 16 * @return Keys in the order they were stored!
18 17 */
19 18 @Override
20 - public @NotNull @Immutable List<String> getKeys()
21 - {
19 + public @NotNull @Immutable List<String> getKeys() {
22 20 return mPropertyFileAccessor.getKeys();
23 21 }
24 22
25 23 @Override
26 - public @NullOrSignificantText String getValue( String pKey )
27 - {
24 + public @NullOrSignificantText String getValue( String pKey ) {
28 25 String zProperty = mPropertyFileAccessor.getProperty( pKey );
29 26 return ConstrainTo.notNull( zProperty ).isEmpty() ? null : zProperty;
30 27 }
31 28
32 29 @Override
33 - public @Nullable MasterUnvalidatedEntry getEntry( String pKey )
34 - {
30 + public @Nullable MasterUnvalidatedEntry getEntry( String pKey ) {
35 31 String zValue = getValue( pKey );
36 32 return (zValue == null) ? null : new MasterUnvalidatedEntry( pKey, zValue );
37 33 }
38 34
39 35 @Override
40 36 public @NotNull MasterUnvalidatedAccessor reload()
41 - throws IOException
42 - {
37 + throws IOException {
43 38 return new MasterUnvalidatedAccessorPropertyFile( mPropertyFileAccessor );
44 39 }
45 40
46 41 /**
47 - * Writes all the properties to a properties file retaining the order of the properties as they were read and retaining any comments as they were read as well.
42 + * Writes all the properties to a properties file retaining the order of the properties as they were read and retaining any comments as they were read as
43 + * well.
48 44 *
49 45 * @throws IOException
50 46 */
51 47 public void save()
52 - throws IOException
53 - {
48 + throws IOException {
54 49 mPropertyFileAccessor.save();
55 50 }
56 51
57 52 public MasterUnvalidatedAccessorPropertyFile( String pPropertyFile )
58 - throws IOException
59 - {
53 + throws IOException {
60 54 this( new File( Confirm.significant( "PropertyFile", pPropertyFile ) ) );
61 55 }
62 56
63 57 public MasterUnvalidatedAccessorPropertyFile( File pPropertyFile )
64 - throws IOException
65 - {
58 + throws IOException {
66 59 this( new SimplePropertyFileAccessorImpl( Confirm.isNotNull( "PropertyFile", pPropertyFile ) ) );
67 60 }
68 61
69 - public MasterUnvalidatedAccessorPropertyFile( SimplePropertyFileAccessor pPropertyFileAccessor )
70 - {
62 + public MasterUnvalidatedAccessorPropertyFile( SimplePropertyFileAccessor pPropertyFileAccessor ) {
71 63 mPropertyFileAccessor = pPropertyFileAccessor;
72 64 }
73 65