public class ProfileItem extends Object
Modifier and Type | Field and Description |
---|---|
int |
max
It specifies the ending point of the profile item.
|
int |
min
It specifies the starting point of the profile item.
|
int |
value
It specifies the amount by which this profile item contributes in the profile.
|
Constructor and Description |
---|
ProfileItem()
It constructs a profile item.
|
ProfileItem(int a,
int b,
int val)
It constructs a profile item which spans over interval (a, b) with a given amount
specified by val.
|
ProfileItem(short type)
It constructs the profile item with a given type.
|
ProfileItem(short type,
int a,
int b,
int val)
It constructs a profile item of a given type spanning across the given interval
and contributing a given amount towards the profile.
|
Modifier and Type | Method and Description |
---|---|
int |
max()
It returns the ending point of the profile item.
|
int |
min()
It returns the starting point of the profile item.
|
void |
overlap(ProfileItem a,
ProfileItem left,
ProfileItem overlap,
ProfileItem right)
It compute the overlap with the specified profile item.
|
void |
set(int a,
int b,
int val)
It sets the attributes of the profile item.
|
void |
setMax(int b)
It sets the ending point of the profile item.
|
void |
setMin(int a)
It sets the starting point of the profile item.
|
void |
setValue(int val)
It sets the amount by which this profile item is contributing towards the profile.
|
void |
subtract(ProfileItem a,
ProfileItem left,
ProfileItem right)
It computes subtraction of a given item and returns the result.
|
String |
toString() |
int |
value()
It returns the amount which is being contributed by this profile item to the profile.
|
public int min
public int max
public int value
public ProfileItem()
public ProfileItem(int a, int b, int val)
a
- starting point of the profile item.b
- ending point of the profile item.val
- the contribution of the item towards the profile.public ProfileItem(short type)
type
- it specifies the type of the profile item.public ProfileItem(short type, int a, int b, int val)
type
- it specifies the type of the profile item.a
- it specifies the starting point of the profile item.b
- it specifies the ending point of the profile item.val
- it specifies how much this profile item contributes in the profile.public int max()
public int min()
public void overlap(ProfileItem a, ProfileItem left, ProfileItem overlap, ProfileItem right)
a
- the object for which the overlap with current object is being computed.left
- the left part of this profile item which is not being overlapped.overlap
- the overlapped part.right
- the right part of this profile item which is not being overlapped.public void set(int a, int b, int val)
a
- the starting point of the profile item.b
- the ending point of the profile item.val
- the amount contributed towards a profile by this profile item.public void setMax(int b)
b
- the ending point of the profile itempublic void setMin(int a)
a
- the starting point of the profile item.public void setValue(int val)
val
- amount by which this profile item is contributing towards the profilepublic void subtract(ProfileItem a, ProfileItem left, ProfileItem right)
a
- the item being subtracted from this profile item.left
- the left part remaining after subtraction.right
- the right part remaining after subtraction.public int value()
Copyright © 2022. All rights reserved.