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 TypeMethodDescriptionint
begin()
static ImmutableRegion.Builder
builder()
Creates a builder forImmutableRegion
.static ImmutableRegion
Creates an immutable copy of aRegion
value.int
end()
entries()
boolean
This instance is equal to all instances ofImmutableRegion
that have equal attribute values.int
hashCode()
Computes a hash code from attributes:entries
,begin
,end
.boolean
static ImmutableRegion
of
(Iterable<? extends BpSeq.Entry> entries) Construct a new immutableRegion
instance.static ImmutableRegion
of
(List<BpSeq.Entry> entries) Construct a new immutableRegion
instance.final ImmutableRegion
withBegin
(int value) Copy the current immutable object by setting a value for thebegin
attribute.final ImmutableRegion
withEnd
(int value) Copy the current immutable object by setting a value for theend
attribute.final ImmutableRegion
withEntries
(Iterable<? extends BpSeq.Entry> elements) Copy the current immutable object with elements that replace the content ofentries
.final ImmutableRegion
withEntries
(BpSeq.Entry... elements) Copy the current immutable object with elements that replace the content ofentries
.final ImmutableRegion
withIsRemoved
(boolean value) Copy the current immutable object by setting a value for theisRemoved
attribute.
-
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
this
object
-
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
this
object
-
withBegin
Copy the current immutable object by setting a value for thebegin
attribute. 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
this
object
-
withEnd
Copy the current immutable object by setting a value for theend
attribute. 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
this
object
-
withIsRemoved
Copy the current immutable object by setting a value for theisRemoved
attribute. 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
this
object
-
equals
This instance is equal to all instances ofImmutableRegion
that have equal attribute values. -
hashCode
public int hashCode()Computes a hash code from attributes:entries
,begin
,end
. -
of
Construct a new immutableRegion
instance.- Parameters:
entries
- The value for theentries
attribute- Returns:
- An immutable Region instance
-
of
Construct a new immutableRegion
instance.- Parameters:
entries
- The value for theentries
attribute- Returns:
- An immutable Region instance
-
copyOf
Creates an immutable copy of aRegion
value. 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) //
entries
elements .begin(int) // optionalbegin
.end(int) // optionalend
.isRemoved(boolean) // optionalisRemoved
.build();- Returns:
- A new ImmutableRegion builder
-