Package pl.poznan.put.structure.formats
Class ImmutableDefaultConverter
- java.lang.Object
-
- pl.poznan.put.structure.formats.DefaultConverter
-
- pl.poznan.put.structure.formats.ImmutableDefaultConverter
-
- All Implemented Interfaces:
Converter
@ParametersAreNonnullByDefault @Generated("org.immutables.processor.ProxyProcessor") @Immutable public final class ImmutableDefaultConverter extends DefaultConverter
Immutable implementation ofDefaultConverter.Use the builder to create immutable instances:
ImmutableDefaultConverter.builder(). Use the static factory method to get the default singleton instance:ImmutableDefaultConverter.of().
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classImmutableDefaultConverter.BuilderBuilds instances of typeImmutableDefaultConverter.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ImmutableDefaultConverter.Builderbuilder()Creates a builder forImmutableDefaultConverter.static ImmutableDefaultConvertercopyOf(DefaultConverter instance)Creates an immutable copy of aDefaultConvertervalue.booleanequals(Object another)This instance is equal to all instances ofImmutableDefaultConverterthat have equal attribute values.inthashCode()Computes a hash code from attributes:pseudoknotFinder,maxSolutions.intmaxSolutions()static ImmutableDefaultConverterof()Returns the default immutable singleton value ofDefaultConverterPseudoknotFinderpseudoknotFinder()StringtoString()Prints the immutable valueDefaultConverterwith attribute values.ImmutableDefaultConverterwithMaxSolutions(int value)Copy the current immutable object by setting a value for themaxSolutionsattribute.ImmutableDefaultConverterwithPseudoknotFinder(PseudoknotFinder value)Copy the current immutable object by setting a value for thepseudoknotFinderattribute.-
Methods inherited from class pl.poznan.put.structure.formats.DefaultConverter
convert
-
-
-
-
Method Detail
-
pseudoknotFinder
public PseudoknotFinder pseudoknotFinder()
- Overrides:
pseudoknotFinderin classDefaultConverter- Returns:
- The finder of pseudoknots (
MinGainby default).
-
maxSolutions
public int maxSolutions()
- Overrides:
maxSolutionsin classDefaultConverter- Returns:
- The number of solutions to return (1 by default).
-
withPseudoknotFinder
public final ImmutableDefaultConverter withPseudoknotFinder(PseudoknotFinder value)
Copy the current immutable object by setting a value for thepseudoknotFinderattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for pseudoknotFinder- Returns:
- A modified copy of the
thisobject
-
withMaxSolutions
public final ImmutableDefaultConverter withMaxSolutions(int value)
Copy the current immutable object by setting a value for themaxSolutionsattribute. A value equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for maxSolutions- Returns:
- A modified copy of the
thisobject
-
equals
public boolean equals(@Nullable Object another)
This instance is equal to all instances ofImmutableDefaultConverterthat have equal attribute values.
-
hashCode
public int hashCode()
Computes a hash code from attributes:pseudoknotFinder,maxSolutions.
-
toString
public String toString()
Prints the immutable valueDefaultConverterwith attribute values.
-
of
public static ImmutableDefaultConverter of()
Returns the default immutable singleton value ofDefaultConverter- Returns:
- An immutable instance of DefaultConverter
-
copyOf
public static ImmutableDefaultConverter copyOf(DefaultConverter instance)
Creates an immutable copy of aDefaultConvertervalue. 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 DefaultConverter instance
-
builder
public static ImmutableDefaultConverter.Builder builder()
Creates a builder forImmutableDefaultConverter.ImmutableDefaultConverter.builder() .pseudoknotFinder(pl.poznan.put.structure.pseudoknots.PseudoknotFinder) // optionalpseudoknotFinder.maxSolutions(int) // optionalmaxSolutions.build();- Returns:
- A new ImmutableDefaultConverter builder
-
-