Package com.github.searls.jasmine.model
Class ImmutableScriptSearch
- java.lang.Object
-
- com.github.searls.jasmine.model.ImmutableScriptSearch
-
- All Implemented Interfaces:
ScriptSearch
@ParametersAreNonnullByDefault @Generated("org.immutables.processor.ProxyProcessor") @Immutable @CheckReturnValue public final class ImmutableScriptSearch extends Object implements ScriptSearch
Immutable implementation ofScriptSearch.Use the builder to create immutable instances:
ImmutableScriptSearch.builder().
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classImmutableScriptSearch.BuilderBuilds instances of typeImmutableScriptSearch.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ImmutableScriptSearch.Builderbuilder()Creates a builder forImmutableScriptSearch.static ImmutableScriptSearchcopyOf(ScriptSearch instance)Creates an immutable copy of aScriptSearchvalue.booleanequals(Object another)This instance is equal to all instances ofImmutableScriptSearchthat have equal attribute values.FilegetDirectory()com.google.common.collect.ImmutableList<String>getExcludes()com.google.common.collect.ImmutableList<String>getIncludes()inthashCode()Computes a hash code from attributes:directory,includes,excludes.StringtoString()Prints the immutable valueScriptSearchwith attribute values.ImmutableScriptSearchwithDirectory(File value)Copy the current immutable object by setting a value for thedirectoryattribute.ImmutableScriptSearchwithExcludes(Iterable<String> elements)Copy the current immutable object with elements that replace the content ofexcludes.ImmutableScriptSearchwithExcludes(String... elements)Copy the current immutable object with elements that replace the content ofexcludes.ImmutableScriptSearchwithIncludes(Iterable<String> elements)Copy the current immutable object with elements that replace the content ofincludes.ImmutableScriptSearchwithIncludes(String... elements)Copy the current immutable object with elements that replace the content ofincludes.
-
-
-
Method Detail
-
getDirectory
public File getDirectory()
- Specified by:
getDirectoryin interfaceScriptSearch- Returns:
- The value of the
directoryattribute
-
getIncludes
public com.google.common.collect.ImmutableList<String> getIncludes()
- Specified by:
getIncludesin interfaceScriptSearch- Returns:
- The value of the
includesattribute
-
getExcludes
public com.google.common.collect.ImmutableList<String> getExcludes()
- Specified by:
getExcludesin interfaceScriptSearch- Returns:
- The value of the
excludesattribute
-
withDirectory
public final ImmutableScriptSearch withDirectory(File value)
Copy the current immutable object by setting a value for thedirectoryattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for directory- Returns:
- A modified copy of the
thisobject
-
withIncludes
public final ImmutableScriptSearch withIncludes(String... elements)
Copy the current immutable object with elements that replace the content ofincludes.- Parameters:
elements- The elements to set- Returns:
- A modified copy of
thisobject
-
withIncludes
public final ImmutableScriptSearch withIncludes(Iterable<String> elements)
Copy the current immutable object with elements that replace the content ofincludes. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
elements- An iterable of includes elements to set- Returns:
- A modified copy of
thisobject
-
withExcludes
public final ImmutableScriptSearch withExcludes(String... elements)
Copy the current immutable object with elements that replace the content ofexcludes.- Parameters:
elements- The elements to set- Returns:
- A modified copy of
thisobject
-
withExcludes
public final ImmutableScriptSearch withExcludes(Iterable<String> elements)
Copy the current immutable object with elements that replace the content ofexcludes. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
elements- An iterable of excludes elements to set- Returns:
- A modified copy of
thisobject
-
equals
public boolean equals(@Nullable Object another)This instance is equal to all instances ofImmutableScriptSearchthat have equal attribute values.
-
hashCode
public int hashCode()
Computes a hash code from attributes:directory,includes,excludes.
-
toString
public String toString()
Prints the immutable valueScriptSearchwith attribute values.
-
copyOf
public static ImmutableScriptSearch copyOf(ScriptSearch instance)
Creates an immutable copy of aScriptSearchvalue. Uses accessors to get values to initialize the new immutable instance. If an instance is already immutable, it is returned as is.- Parameters:
instance- The instance to copy- Returns:
- A copied immutable ScriptSearch instance
-
builder
public static ImmutableScriptSearch.Builder builder()
Creates a builder forImmutableScriptSearch.ImmutableScriptSearch.builder() .directory(java.io.File) // requireddirectory.addIncludes|addAllIncludes(String) //includeselements .addExcludes|addAllExcludes(String) //excludeselements .build();- Returns:
- A new ImmutableScriptSearch builder
-
-