Class ImmutableRegion
java.lang.Object
pl.poznan.put.structure.pseudoknots.Region
pl.poznan.put.structure.pseudoknots.ImmutableRegion
- All Implemented Interfaces:
Comparable<Region>
@ParametersAreNonnullByDefault
@Generated("org.immutables.processor.ProxyProcessor")
@Immutable
public final class ImmutableRegion
extends Region
Immutable implementation of
Region.
Use the builder to create immutable instances:
ImmutableRegion.builder().
Use the static factory method to create immutable instances:
ImmutableRegion.of().
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionintbegin()static ImmutableRegion.Builderbuilder()Creates a builder forImmutableRegion.static ImmutableRegionCreates an immutable copy of aRegionvalue.intend()entries()booleanThis instance is equal to all instances ofImmutableRegionthat have equal attribute values.inthashCode()Computes a hash code from attributes:entries,begin,end.booleanstatic ImmutableRegionof(Iterable<? extends BpSeq.Entry> entries) Construct a new immutableRegioninstance.static ImmutableRegionof(List<BpSeq.Entry> entries) Construct a new immutableRegioninstance.final ImmutableRegionwithBegin(int value) Copy the current immutable object by setting a value for thebeginattribute.final ImmutableRegionwithEnd(int value) Copy the current immutable object by setting a value for theendattribute.final ImmutableRegionwithEntries(Iterable<? extends BpSeq.Entry> elements) Copy the current immutable object with elements that replace the content ofentries.final ImmutableRegionwithEntries(BpSeq.Entry... elements) Copy the current immutable object with elements that replace the content ofentries.final ImmutableRegionwithIsRemoved(boolean value) Copy the current immutable object by setting a value for theisRemovedattribute.
-
Method Details
-
entries
-
begin
public int begin() -
end
public int end() -
isRemoved
public boolean isRemoved() -
withEntries
Copy the current immutable object with elements that replace the content ofentries.- Parameters:
elements- The elements to set- Returns:
- A modified copy of
thisobject
-
withEntries
Copy the current immutable object with elements that replace the content ofentries. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
elements- An iterable of entries elements to set- Returns:
- A modified copy of
thisobject
-
withBegin
Copy the current immutable object by setting a value for thebeginattribute. A value equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for begin- Returns:
- A modified copy of the
thisobject
-
withEnd
Copy the current immutable object by setting a value for theendattribute. A value equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for end- Returns:
- A modified copy of the
thisobject
-
withIsRemoved
Copy the current immutable object by setting a value for theisRemovedattribute. A value equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for isRemoved- Returns:
- A modified copy of the
thisobject
-
equals
This instance is equal to all instances ofImmutableRegionthat have equal attribute values. -
hashCode
public int hashCode()Computes a hash code from attributes:entries,begin,end. -
of
Construct a new immutableRegioninstance.- Parameters:
entries- The value for theentriesattribute- Returns:
- An immutable Region instance
-
of
Construct a new immutableRegioninstance.- Parameters:
entries- The value for theentriesattribute- Returns:
- An immutable Region instance
-
copyOf
Creates an immutable copy of aRegionvalue. 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 Region instance
-
builder
Creates a builder forImmutableRegion.ImmutableRegion.builder() .addEntries|addAllEntries(pl.poznan.put.structure.formats.BpSeq.Entry) //entrieselements .begin(int) // optionalbegin.end(int) // optionalend.isRemoved(boolean) // optionalisRemoved.build();- Returns:
- A new ImmutableRegion builder
-