Package edu.odu.cs.zeil.codegrader
Class Deferred<T>
- java.lang.Object
-
- edu.odu.cs.zeil.codegrader.Deferred<T>
-
public class Deferred<T> extends java.lang.Object
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Tget(java.nio.file.Path dir)Provide the desired value.voidset(T value)Set the value (overrides any values in files).
-
-
-
Constructor Detail
-
Deferred
public Deferred(java.lang.String extension, T defaultVal, Parser<T> parser)Provide a value of type either as an explicitly assigned default or by reading it, on demand, from a file with a given extension.- Parameters:
extension- the extension of the file to look for, not including the '.'. The first such file found in the directory will be used.defaultVal- the value to supply if no such file exists.parser- An object capable of reading the desired value from a String.
-
-