Top Description Inners Fields Constructors Methods
org.eclipse.jgit.revwalk.filter

public abstract Class CommitTimeRevFilter

extends RevFilter
Class Inheritance
Known Direct Subclasses
org.eclipse.jgit.revwalk.filter.CommitTimeRevFilter.Before, org.eclipse.jgit.revwalk.filter.CommitTimeRevFilter.After, org.eclipse.jgit.revwalk.filter.CommitTimeRevFilter.Between
Imports
java.io.IOException, java.time.Instant, java.util.Date, org.eclipse.jgit.errors.IncorrectObjectTypeException, .MissingObjectException, .StopWalkException, org.eclipse.jgit.revwalk.RevCommit, .RevWalk

Selects commits based upon the commit time field.

Nested and Inner Type Summary

Modifier and TypeClass and Description
private static class
private static class
private static class

Field Summary

Modifier and TypeField and Description
pack-priv final int
Inherited from org.eclipse.jgit.revwalk.filter.RevFilter:
ALLMERGE_BASENO_MERGESNONEONLY_MERGES

Constructor Summary

AccessConstructor and Description
pack-priv
pack-priv

Method Summary

Modifier and TypeMethod and Description
public static final RevFilter

Returns:

a new filter to select commits on or after ts.
after
(Date
the point in time to cut on.
ts
)
Deprecated since 7.2. Use after(Instant) instead.

Create a new filter to select commits after a given date/time.

public static RevFilter

Returns:

a new filter to select commits on or after ts.
after
(Instant
the point in time to cut on.
ts
)

Create a new filter to select commits after a given date/time.

public static final RevFilter

Returns:

a new filter to select commits on or after ts.
after
(long
the point in time to cut on, in milliseconds.
ts
)

Create a new filter to select commits after a given date/time.

public static final RevFilter

Returns:

a new filter to select commits on or before ts.
before
(Date
the point in time to cut on.
ts
)
Deprecated since 7.2. Use before(Instant) instead.

Create a new filter to select commits before a given date/time.

public static RevFilter

Returns:

a new filter to select commits on or before ts.
before
(Instant
the point in time to cut on.
ts
)

Create a new filter to select commits before a given date/time.

public static final RevFilter

Returns:

a new filter to select commits on or before ts.
before
(long
the point in time to cut on, in milliseconds
ts
)

Create a new filter to select commits before a given date/time.

public static final RevFilter

Returns:

a new filter to select commits between the given date/times.
between
(Date
the point in time to cut on.
since
,
Date
the point in time to cut off.
until
)
Deprecated since 7.2. Use between(Instant, Instant) instead.

Create a new filter to select commits after or equal a given date/time since and before or equal a given date/time until.

public static RevFilter

Returns:

a new filter to select commits between the given date/times.
between
(Instant
the point in time to cut on.
since
,
Instant
the point in time to cut off.
until
)

Create a new filter to select commits after or equal a given date/time since and before or equal a given date/time until.

public static final RevFilter

Returns:

a new filter to select commits between the given date/times.
between
(long
the point in time to cut on, in milliseconds.
since
,
long
the point in time to cut off, in millisconds.
until
)
Deprecated since 7.2. Use between(Instant, Instant) instead.

Create a new filter to select commits after or equal a given date/time since and before or equal a given date/time until.

public RevFilter
clone()

Implements abstract org.eclipse.jgit.revwalk.filter.RevFilter.clone.

Creates and returns a copy of this object.

public boolean
requiresCommitBody()

Overrides org.eclipse.jgit.revwalk.filter.RevFilter.requiresCommitBody.

Whether the filter needs the commit body to be parsed.

Inherited from org.eclipse.jgit.revwalk.filter.RevFilter:
includenegatetoString

Field Detail

whenback to summary
pack-priv final int when

Constructor Detail

CommitTimeRevFilterback to summary
pack-priv CommitTimeRevFilter(long ts)
CommitTimeRevFilterback to summary
pack-priv CommitTimeRevFilter(Instant t)

Method Detail

afterback to summary
public static final RevFilter after(Date ts)

Deprecated

since 7.2.

Use after(Instant) instead.

Create a new filter to select commits after a given date/time.

Parameters
ts:Date

the point in time to cut on.

Returns:RevFilter

a new filter to select commits on or after ts.

Annotations
@Deprecated
since:7.2
afterback to summary
public static RevFilter after(Instant ts)

Create a new filter to select commits after a given date/time.

Parameters
ts:Instant

the point in time to cut on.

Returns:RevFilter

a new filter to select commits on or after ts.

Since
7.2
afterback to summary
public static final RevFilter after(long ts)

Create a new filter to select commits after a given date/time.

Parameters
ts:long

the point in time to cut on, in milliseconds.

Returns:RevFilter

a new filter to select commits on or after ts.

beforeback to summary
public static final RevFilter before(Date ts)

Deprecated

since 7.2.

Use before(Instant) instead.

Create a new filter to select commits before a given date/time.

Parameters
ts:Date

the point in time to cut on.

Returns:RevFilter

a new filter to select commits on or before ts.

Annotations
@Deprecated
since:7.2
beforeback to summary
public static RevFilter before(Instant ts)

Create a new filter to select commits before a given date/time.

Parameters
ts:Instant

the point in time to cut on.

Returns:RevFilter

a new filter to select commits on or before ts.

Since
7.2
beforeback to summary
public static final RevFilter before(long ts)

Create a new filter to select commits before a given date/time.

Parameters
ts:long

the point in time to cut on, in milliseconds

Returns:RevFilter

a new filter to select commits on or before ts.

betweenback to summary
public static final RevFilter between(Date since, Date until)

Deprecated

since 7.2.

Use between(Instant, Instant) instead.

Create a new filter to select commits after or equal a given date/time since and before or equal a given date/time until.

Parameters
since:Date

the point in time to cut on.

until:Date

the point in time to cut off.

Returns:RevFilter

a new filter to select commits between the given date/times.

Annotations
@Deprecated
since:7.2
betweenback to summary
public static RevFilter between(Instant since, Instant until)

Create a new filter to select commits after or equal a given date/time since and before or equal a given date/time until.

Parameters
since:Instant

the point in time to cut on.

until:Instant

the point in time to cut off.

Returns:RevFilter

a new filter to select commits between the given date/times.

Since
7.2
betweenback to summary
public static final RevFilter between(long since, long until)

Deprecated

since 7.2.

Use between(Instant, Instant) instead.

Create a new filter to select commits after or equal a given date/time since and before or equal a given date/time until.

Parameters
since:long

the point in time to cut on, in milliseconds.

until:long

the point in time to cut off, in millisconds.

Returns:RevFilter

a new filter to select commits between the given date/times.

Annotations
@Deprecated
since:7.2
cloneback to summary
public RevFilter clone()

Implements abstract org.eclipse.jgit.revwalk.filter.RevFilter.clone.

Doc from org.eclipse.jgit.revwalk.filter.RevFilter.clone.

Creates and returns a copy of this object. The precise meaning of "copy" may depend on the class of the object. The general intent is that, for any object x, the expression:

x.clone() != x
will be true, and that the expression:
x.clone().getClass() == x.getClass()
will be true, but these are not absolute requirements. While it is typically the case that:
x.clone().equals(x)
will be true, this is not an absolute requirement.

By convention, the returned object should be obtained by calling super.clone. If a class and all of its superclasses (except Object) obey this convention, it will be the case that x.clone().getClass() == x.getClass().

By convention, the object returned by this method should be independent of this object (which is being cloned). To achieve this independence, it may be necessary to modify one or more fields of the object returned by super.clone before returning it. Typically, this means copying any mutable objects that comprise the internal "deep structure" of the object being cloned and replacing the references to these objects with references to the copies. If a class contains only primitive fields or references to immutable objects, then it is usually the case that no fields in the object returned by super.clone need to be modified.

Clone this revision filter, including its parameters.

This is a deep clone. If this filter embeds objects or other filters it must also clone those, to ensure the instances do not share mutable data.

Returns:RevFilter

Doc from java.lang.Object.clone.

a clone of this instance.

Annotations
@Override
requiresCommitBodyback to summary
public boolean requiresCommitBody()

Overrides org.eclipse.jgit.revwalk.filter.RevFilter.requiresCommitBody.

Doc from org.eclipse.jgit.revwalk.filter.RevFilter.requiresCommitBody.

Whether the filter needs the commit body to be parsed.

Returns:boolean

true if the filter needs the commit body to be parsed.

Annotations
@Override
org.eclipse.jgit.revwalk.filter back to summary

private Class CommitTimeRevFilter.After

extends CommitTimeRevFilter
Class Inheritance

Field Summary

Inherited from org.eclipse.jgit.revwalk.filter.CommitTimeRevFilter:
when

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
public boolean
include(RevWalk
the active walker this filter is being invoked from within.
walker
,
RevCommit
the commit currently being tested. The commit has been parsed and its body is available for inspection only if the filter returns true from requiresCommitBody().
cmit
)

Implements abstract org.eclipse.jgit.revwalk.filter.RevFilter.include.

Determine if the supplied commit should be included in results.

public String
toString()

Overrides org.eclipse.jgit.revwalk.filter.RevFilter.toString.

Returns a string representation of the object.

Inherited from org.eclipse.jgit.revwalk.filter.CommitTimeRevFilter:
afterafterafterbeforebeforebeforebetweenbetweenbetweenclonerequiresCommitBody

Constructor Detail

Afterback to summary
pack-priv After(Instant t)

Method Detail

includeback to summary
public boolean include(RevWalk walker, RevCommit cmit) throws StopWalkException, MissingObjectException, IncorrectObjectTypeException, IOException

Implements abstract org.eclipse.jgit.revwalk.filter.RevFilter.include.

Doc from org.eclipse.jgit.revwalk.filter.RevFilter.include.

Determine if the supplied commit should be included in results.

Parameters
walker:RevWalk

the active walker this filter is being invoked from within.

cmit:RevCommit

the commit currently being tested. The commit has been parsed and its body is available for inspection only if the filter returns true from requiresCommitBody().

Returns:boolean

true to include this commit in the results; false to have this commit be omitted entirely from the results.

Annotations
@Override
Exceptions
StopWalkException:
the filter knows for certain that no additional commits can ever match, and the current commit doesn't match either. The walk is halted and no more results are provided.
MissingObjectException:
an object the filter needs to consult to determine its answer does not exist in the Git repository the walker is operating on. Filtering this commit is impossible without the object.
IncorrectObjectTypeException:
an object the filter needed to consult was not of the expected object type. This usually indicates a corrupt repository, as an object link is referencing the wrong type.
IOException:
a loose object or pack file could not be read to obtain data necessary for the filter to make its decision.
toStringback to summary
public String toString()

Overrides org.eclipse.jgit.revwalk.filter.RevFilter.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object. Satisfying this method's contract implies a non-null result must be returned.

Returns:String

a string representation of the object

Annotations
@SuppressWarnings:nls
@Override
org.eclipse.jgit.revwalk.filter back to summary

private Class CommitTimeRevFilter.Before

extends CommitTimeRevFilter
Class Inheritance

Field Summary

Inherited from org.eclipse.jgit.revwalk.filter.CommitTimeRevFilter:
when

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
public boolean
include(RevWalk
the active walker this filter is being invoked from within.
walker
,
RevCommit
the commit currently being tested. The commit has been parsed and its body is available for inspection only if the filter returns true from requiresCommitBody().
cmit
)

Implements abstract org.eclipse.jgit.revwalk.filter.RevFilter.include.

Determine if the supplied commit should be included in results.

public String
toString()

Overrides org.eclipse.jgit.revwalk.filter.RevFilter.toString.

Returns a string representation of the object.

Inherited from org.eclipse.jgit.revwalk.filter.CommitTimeRevFilter:
afterafterafterbeforebeforebeforebetweenbetweenbetweenclonerequiresCommitBody

Constructor Detail

Beforeback to summary
pack-priv Before(Instant t)

Method Detail

includeback to summary
public boolean include(RevWalk walker, RevCommit cmit) throws StopWalkException, MissingObjectException, IncorrectObjectTypeException, IOException

Implements abstract org.eclipse.jgit.revwalk.filter.RevFilter.include.

Doc from org.eclipse.jgit.revwalk.filter.RevFilter.include.

Determine if the supplied commit should be included in results.

Parameters
walker:RevWalk

the active walker this filter is being invoked from within.

cmit:RevCommit

the commit currently being tested. The commit has been parsed and its body is available for inspection only if the filter returns true from requiresCommitBody().

Returns:boolean

true to include this commit in the results; false to have this commit be omitted entirely from the results.

Annotations
@Override
Exceptions
StopWalkException:
the filter knows for certain that no additional commits can ever match, and the current commit doesn't match either. The walk is halted and no more results are provided.
MissingObjectException:
an object the filter needs to consult to determine its answer does not exist in the Git repository the walker is operating on. Filtering this commit is impossible without the object.
IncorrectObjectTypeException:
an object the filter needed to consult was not of the expected object type. This usually indicates a corrupt repository, as an object link is referencing the wrong type.
IOException:
a loose object or pack file could not be read to obtain data necessary for the filter to make its decision.
toStringback to summary
public String toString()

Overrides org.eclipse.jgit.revwalk.filter.RevFilter.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object. Satisfying this method's contract implies a non-null result must be returned.

Returns:String

a string representation of the object

Annotations
@SuppressWarnings:nls
@Override
org.eclipse.jgit.revwalk.filter back to summary

private Class CommitTimeRevFilter.Between

extends CommitTimeRevFilter
Class Inheritance

Field Summary

Modifier and TypeField and Description
private final int
Inherited from org.eclipse.jgit.revwalk.filter.CommitTimeRevFilter:
when

Constructor Summary

AccessConstructor and Description
pack-priv
Between(Instant since, Instant until)

Method Summary

Modifier and TypeMethod and Description
public boolean
include(RevWalk
the active walker this filter is being invoked from within.
walker
,
RevCommit
the commit currently being tested. The commit has been parsed and its body is available for inspection only if the filter returns true from requiresCommitBody().
cmit
)

Implements abstract org.eclipse.jgit.revwalk.filter.RevFilter.include.

Determine if the supplied commit should be included in results.

public String
toString()

Overrides org.eclipse.jgit.revwalk.filter.RevFilter.toString.

Returns a string representation of the object.

Inherited from org.eclipse.jgit.revwalk.filter.CommitTimeRevFilter:
afterafterafterbeforebeforebeforebetweenbetweenbetweenclonerequiresCommitBody

Field Detail

untilback to summary
private final int until

Constructor Detail

Betweenback to summary
pack-priv Between(Instant since, Instant until)

Method Detail

includeback to summary
public boolean include(RevWalk walker, RevCommit cmit) throws StopWalkException, MissingObjectException, IncorrectObjectTypeException, IOException

Implements abstract org.eclipse.jgit.revwalk.filter.RevFilter.include.

Doc from org.eclipse.jgit.revwalk.filter.RevFilter.include.

Determine if the supplied commit should be included in results.

Parameters
walker:RevWalk

the active walker this filter is being invoked from within.

cmit:RevCommit

the commit currently being tested. The commit has been parsed and its body is available for inspection only if the filter returns true from requiresCommitBody().

Returns:boolean

true to include this commit in the results; false to have this commit be omitted entirely from the results.

Annotations
@Override
Exceptions
StopWalkException:
the filter knows for certain that no additional commits can ever match, and the current commit doesn't match either. The walk is halted and no more results are provided.
MissingObjectException:
an object the filter needs to consult to determine its answer does not exist in the Git repository the walker is operating on. Filtering this commit is impossible without the object.
IncorrectObjectTypeException:
an object the filter needed to consult was not of the expected object type. This usually indicates a corrupt repository, as an object link is referencing the wrong type.
IOException:
a loose object or pack file could not be read to obtain data necessary for the filter to make its decision.
toStringback to summary
public String toString()

Overrides org.eclipse.jgit.revwalk.filter.RevFilter.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object. Satisfying this method's contract implies a non-null result must be returned.

Returns:String

a string representation of the object

Annotations
@SuppressWarnings:nls
@Override