Package org.fcrepo.http.commons.domain
Class Range.RangeOfLength
- java.lang.Object
-
- org.fcrepo.http.commons.domain.Range.RangeOfLength
-
- Enclosing class:
- Range
public static class Range.RangeOfLength extends Object
Represents a range object based on length
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedRangeOfLength(long start, long end, long length)Create a range object based on length
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description longend()StringendAsString()booleanisSatisfiable()longsize()longstart()StringstartAsString()
-
-
-
Constructor Detail
-
RangeOfLength
protected RangeOfLength(long start, long end, long length)
Create a range object based on length- Parameters:
start- the start of the rangeend- the end of the rangelength- the length of the content
-
-
Method Detail
-
start
public long start()
- Returns:
- the start of the range
-
startAsString
public String startAsString()
- Returns:
- the start of the range as a string
-
end
public long end()
- Returns:
- the end of the range
-
endAsString
public String endAsString()
- Returns:
- the end of the range as a string
-
isSatisfiable
public boolean isSatisfiable()
- Returns:
- true if the range is satisfiable
-
size
public long size()
- Returns:
- the size of the range, start & end inclusive so 0-0 is size 1
-
-