id int32 0 165k | repo stringlengths 7 58 | path stringlengths 12 218 | func_name stringlengths 3 140 | original_string stringlengths 73 34.1k | language stringclasses 1
value | code stringlengths 73 34.1k | code_tokens list | docstring stringlengths 3 16k | docstring_tokens list | sha stringlengths 40 40 | url stringlengths 105 339 |
|---|---|---|---|---|---|---|---|---|---|---|---|
49,300 | neo4j/neo4j-java-driver | driver/src/main/java/org/neo4j/driver/internal/ConnectionSettings.java | ConnectionSettings.driverVersion | private static String driverVersion()
{
// "Session" is arbitrary - the only thing that matters is that the class we use here is in the
// 'org.neo4j.driver' package, because that is where the jar manifest specifies the version.
// This is done as part of the build, adding a MANIFEST.MF file... | java | private static String driverVersion()
{
// "Session" is arbitrary - the only thing that matters is that the class we use here is in the
// 'org.neo4j.driver' package, because that is where the jar manifest specifies the version.
// This is done as part of the build, adding a MANIFEST.MF file... | [
"private",
"static",
"String",
"driverVersion",
"(",
")",
"{",
"// \"Session\" is arbitrary - the only thing that matters is that the class we use here is in the",
"// 'org.neo4j.driver' package, because that is where the jar manifest specifies the version.",
"// This is done as part of the build,... | Extracts the driver version from the driver jar MANIFEST.MF file. | [
"Extracts",
"the",
"driver",
"version",
"from",
"the",
"driver",
"jar",
"MANIFEST",
".",
"MF",
"file",
"."
] | 8dad6c48251fa1ab7017e72d9998a24fa2337a22 | https://github.com/neo4j/neo4j-java-driver/blob/8dad6c48251fa1ab7017e72d9998a24fa2337a22/driver/src/main/java/org/neo4j/driver/internal/ConnectionSettings.java#L37-L51 |
49,301 | neo4j/neo4j-java-driver | examples/src/main/java/org/neo4j/docs/driver/PassBookmarkExample.java | PassBookmarkExample.addCompany | private StatementResult addCompany( final Transaction tx, final String name )
{
return tx.run( "CREATE (:Company {name: $name})", parameters( "name", name ) );
} | java | private StatementResult addCompany( final Transaction tx, final String name )
{
return tx.run( "CREATE (:Company {name: $name})", parameters( "name", name ) );
} | [
"private",
"StatementResult",
"addCompany",
"(",
"final",
"Transaction",
"tx",
",",
"final",
"String",
"name",
")",
"{",
"return",
"tx",
".",
"run",
"(",
"\"CREATE (:Company {name: $name})\"",
",",
"parameters",
"(",
"\"name\"",
",",
"name",
")",
")",
";",
"}"... | Create a company node | [
"Create",
"a",
"company",
"node"
] | 8dad6c48251fa1ab7017e72d9998a24fa2337a22 | https://github.com/neo4j/neo4j-java-driver/blob/8dad6c48251fa1ab7017e72d9998a24fa2337a22/examples/src/main/java/org/neo4j/docs/driver/PassBookmarkExample.java#L44-L47 |
49,302 | neo4j/neo4j-java-driver | examples/src/main/java/org/neo4j/docs/driver/PassBookmarkExample.java | PassBookmarkExample.addPerson | private StatementResult addPerson( final Transaction tx, final String name )
{
return tx.run( "CREATE (:Person {name: $name})", parameters( "name", name ) );
} | java | private StatementResult addPerson( final Transaction tx, final String name )
{
return tx.run( "CREATE (:Person {name: $name})", parameters( "name", name ) );
} | [
"private",
"StatementResult",
"addPerson",
"(",
"final",
"Transaction",
"tx",
",",
"final",
"String",
"name",
")",
"{",
"return",
"tx",
".",
"run",
"(",
"\"CREATE (:Person {name: $name})\"",
",",
"parameters",
"(",
"\"name\"",
",",
"name",
")",
")",
";",
"}"
] | Create a person node | [
"Create",
"a",
"person",
"node"
] | 8dad6c48251fa1ab7017e72d9998a24fa2337a22 | https://github.com/neo4j/neo4j-java-driver/blob/8dad6c48251fa1ab7017e72d9998a24fa2337a22/examples/src/main/java/org/neo4j/docs/driver/PassBookmarkExample.java#L50-L53 |
49,303 | neo4j/neo4j-java-driver | examples/src/main/java/org/neo4j/docs/driver/PassBookmarkExample.java | PassBookmarkExample.employ | private StatementResult employ( final Transaction tx, final String person, final String company )
{
return tx.run( "MATCH (person:Person {name: $person_name}) " +
"MATCH (company:Company {name: $company_name}) " +
"CREATE (person)-[:WORKS_FOR]->(company)",
... | java | private StatementResult employ( final Transaction tx, final String person, final String company )
{
return tx.run( "MATCH (person:Person {name: $person_name}) " +
"MATCH (company:Company {name: $company_name}) " +
"CREATE (person)-[:WORKS_FOR]->(company)",
... | [
"private",
"StatementResult",
"employ",
"(",
"final",
"Transaction",
"tx",
",",
"final",
"String",
"person",
",",
"final",
"String",
"company",
")",
"{",
"return",
"tx",
".",
"run",
"(",
"\"MATCH (person:Person {name: $person_name}) \"",
"+",
"\"MATCH (company:Company... | This relies on the person first having been created. | [
"This",
"relies",
"on",
"the",
"person",
"first",
"having",
"been",
"created",
"."
] | 8dad6c48251fa1ab7017e72d9998a24fa2337a22 | https://github.com/neo4j/neo4j-java-driver/blob/8dad6c48251fa1ab7017e72d9998a24fa2337a22/examples/src/main/java/org/neo4j/docs/driver/PassBookmarkExample.java#L57-L63 |
49,304 | neo4j/neo4j-java-driver | examples/src/main/java/org/neo4j/docs/driver/PassBookmarkExample.java | PassBookmarkExample.makeFriends | private StatementResult makeFriends( final Transaction tx, final String person1, final String person2 )
{
return tx.run( "MATCH (a:Person {name: $person_1}) " +
"MATCH (b:Person {name: $person_2}) " +
"MERGE (a)-[:KNOWS]->(b)",
parameters( "per... | java | private StatementResult makeFriends( final Transaction tx, final String person1, final String person2 )
{
return tx.run( "MATCH (a:Person {name: $person_1}) " +
"MATCH (b:Person {name: $person_2}) " +
"MERGE (a)-[:KNOWS]->(b)",
parameters( "per... | [
"private",
"StatementResult",
"makeFriends",
"(",
"final",
"Transaction",
"tx",
",",
"final",
"String",
"person1",
",",
"final",
"String",
"person2",
")",
"{",
"return",
"tx",
".",
"run",
"(",
"\"MATCH (a:Person {name: $person_1}) \"",
"+",
"\"MATCH (b:Person {name: $... | Create a friendship between two people. | [
"Create",
"a",
"friendship",
"between",
"two",
"people",
"."
] | 8dad6c48251fa1ab7017e72d9998a24fa2337a22 | https://github.com/neo4j/neo4j-java-driver/blob/8dad6c48251fa1ab7017e72d9998a24fa2337a22/examples/src/main/java/org/neo4j/docs/driver/PassBookmarkExample.java#L66-L72 |
49,305 | neo4j/neo4j-java-driver | examples/src/main/java/org/neo4j/docs/driver/PassBookmarkExample.java | PassBookmarkExample.printFriends | private StatementResult printFriends( final Transaction tx )
{
StatementResult result = tx.run( "MATCH (a)-[:KNOWS]->(b) RETURN a.name, b.name" );
while ( result.hasNext() )
{
Record record = result.next();
System.out.println( String.format( "%s knows %s", record.get(... | java | private StatementResult printFriends( final Transaction tx )
{
StatementResult result = tx.run( "MATCH (a)-[:KNOWS]->(b) RETURN a.name, b.name" );
while ( result.hasNext() )
{
Record record = result.next();
System.out.println( String.format( "%s knows %s", record.get(... | [
"private",
"StatementResult",
"printFriends",
"(",
"final",
"Transaction",
"tx",
")",
"{",
"StatementResult",
"result",
"=",
"tx",
".",
"run",
"(",
"\"MATCH (a)-[:KNOWS]->(b) RETURN a.name, b.name\"",
")",
";",
"while",
"(",
"result",
".",
"hasNext",
"(",
")",
")"... | Match and display all friendships. | [
"Match",
"and",
"display",
"all",
"friendships",
"."
] | 8dad6c48251fa1ab7017e72d9998a24fa2337a22 | https://github.com/neo4j/neo4j-java-driver/blob/8dad6c48251fa1ab7017e72d9998a24fa2337a22/examples/src/main/java/org/neo4j/docs/driver/PassBookmarkExample.java#L75-L84 |
49,306 | neo4j/neo4j-java-driver | driver/src/main/java/org/neo4j/driver/internal/util/Preconditions.java | Preconditions.checkArgument | public static void checkArgument( Object argument, Class<?> expectedClass )
{
if ( !expectedClass.isInstance( argument ) )
{
throw new IllegalArgumentException( "Argument expected to be of type: " + expectedClass.getName() + " but was: " + argument );
}
} | java | public static void checkArgument( Object argument, Class<?> expectedClass )
{
if ( !expectedClass.isInstance( argument ) )
{
throw new IllegalArgumentException( "Argument expected to be of type: " + expectedClass.getName() + " but was: " + argument );
}
} | [
"public",
"static",
"void",
"checkArgument",
"(",
"Object",
"argument",
",",
"Class",
"<",
"?",
">",
"expectedClass",
")",
"{",
"if",
"(",
"!",
"expectedClass",
".",
"isInstance",
"(",
"argument",
")",
")",
"{",
"throw",
"new",
"IllegalArgumentException",
"(... | Assert that given argument is of expected type.
@param argument the object to check.
@param expectedClass the expected type.
@throws IllegalArgumentException if argument is not of expected type. | [
"Assert",
"that",
"given",
"argument",
"is",
"of",
"expected",
"type",
"."
] | 8dad6c48251fa1ab7017e72d9998a24fa2337a22 | https://github.com/neo4j/neo4j-java-driver/blob/8dad6c48251fa1ab7017e72d9998a24fa2337a22/driver/src/main/java/org/neo4j/driver/internal/util/Preconditions.java#L49-L55 |
49,307 | neo4j/neo4j-java-driver | driver/src/main/java/org/neo4j/driver/AuthTokens.java | AuthTokens.kerberos | public static AuthToken kerberos( String base64EncodedTicket )
{
Objects.requireNonNull( base64EncodedTicket, "Ticket can't be null" );
Map<String,Value> map = newHashMapWithSize( 3 );
map.put( SCHEME_KEY, value( "kerberos" ) );
map.put( PRINCIPAL_KEY, value( "" ) ); // This empty s... | java | public static AuthToken kerberos( String base64EncodedTicket )
{
Objects.requireNonNull( base64EncodedTicket, "Ticket can't be null" );
Map<String,Value> map = newHashMapWithSize( 3 );
map.put( SCHEME_KEY, value( "kerberos" ) );
map.put( PRINCIPAL_KEY, value( "" ) ); // This empty s... | [
"public",
"static",
"AuthToken",
"kerberos",
"(",
"String",
"base64EncodedTicket",
")",
"{",
"Objects",
".",
"requireNonNull",
"(",
"base64EncodedTicket",
",",
"\"Ticket can't be null\"",
")",
";",
"Map",
"<",
"String",
",",
"Value",
">",
"map",
"=",
"newHashMapWi... | The kerberos authentication scheme, using a base64 encoded ticket
@param base64EncodedTicket a base64 encoded service ticket
@return an authentication token that can be used to connect to Neo4j
@see GraphDatabase#driver(String, AuthToken)
@since 1.3
@throws NullPointerException when ticket is {@code null} | [
"The",
"kerberos",
"authentication",
"scheme",
"using",
"a",
"base64",
"encoded",
"ticket"
] | 8dad6c48251fa1ab7017e72d9998a24fa2337a22 | https://github.com/neo4j/neo4j-java-driver/blob/8dad6c48251fa1ab7017e72d9998a24fa2337a22/driver/src/main/java/org/neo4j/driver/AuthTokens.java#L90-L99 |
49,308 | neo4j/neo4j-java-driver | driver/src/main/java/org/neo4j/driver/internal/reactive/RxUtils.java | RxUtils.createEmptyPublisher | public static <T> Publisher<T> createEmptyPublisher( Supplier<CompletionStage<Void>> supplier )
{
return Mono.create( sink -> supplier.get().whenComplete( ( ignore, completionError ) -> {
Throwable error = Futures.completionExceptionCause( completionError );
if ( error != null )
... | java | public static <T> Publisher<T> createEmptyPublisher( Supplier<CompletionStage<Void>> supplier )
{
return Mono.create( sink -> supplier.get().whenComplete( ( ignore, completionError ) -> {
Throwable error = Futures.completionExceptionCause( completionError );
if ( error != null )
... | [
"public",
"static",
"<",
"T",
">",
"Publisher",
"<",
"T",
">",
"createEmptyPublisher",
"(",
"Supplier",
"<",
"CompletionStage",
"<",
"Void",
">",
">",
"supplier",
")",
"{",
"return",
"Mono",
".",
"create",
"(",
"sink",
"->",
"supplier",
".",
"get",
"(",
... | The publisher created by this method will either succeed without publishing anything or fail with an error.
@param supplier supplies a {@link CompletionStage<Void>}.
@return A publisher that publishes nothing on completion or fails with an error. | [
"The",
"publisher",
"created",
"by",
"this",
"method",
"will",
"either",
"succeed",
"without",
"publishing",
"anything",
"or",
"fail",
"with",
"an",
"error",
"."
] | 8dad6c48251fa1ab7017e72d9998a24fa2337a22 | https://github.com/neo4j/neo4j-java-driver/blob/8dad6c48251fa1ab7017e72d9998a24fa2337a22/driver/src/main/java/org/neo4j/driver/internal/reactive/RxUtils.java#L36-L49 |
49,309 | neo4j/neo4j-java-driver | driver/src/main/java/org/neo4j/driver/internal/security/TrustOnFirstUseTrustManager.java | TrustOnFirstUseTrustManager.load | private void load() throws IOException
{
if ( !knownHosts.exists() )
{
return;
}
assertKnownHostFileReadable();
try ( BufferedReader reader = new BufferedReader( new FileReader( knownHosts ) ) )
{
String line;
while ( (line = read... | java | private void load() throws IOException
{
if ( !knownHosts.exists() )
{
return;
}
assertKnownHostFileReadable();
try ( BufferedReader reader = new BufferedReader( new FileReader( knownHosts ) ) )
{
String line;
while ( (line = read... | [
"private",
"void",
"load",
"(",
")",
"throws",
"IOException",
"{",
"if",
"(",
"!",
"knownHosts",
".",
"exists",
"(",
")",
")",
"{",
"return",
";",
"}",
"assertKnownHostFileReadable",
"(",
")",
";",
"try",
"(",
"BufferedReader",
"reader",
"=",
"new",
"Buf... | Try to load the certificate form the file if the server we've connected is a known server.
@throws IOException | [
"Try",
"to",
"load",
"the",
"certificate",
"form",
"the",
"file",
"if",
"the",
"server",
"we",
"ve",
"connected",
"is",
"a",
"known",
"server",
"."
] | 8dad6c48251fa1ab7017e72d9998a24fa2337a22 | https://github.com/neo4j/neo4j-java-driver/blob/8dad6c48251fa1ab7017e72d9998a24fa2337a22/driver/src/main/java/org/neo4j/driver/internal/security/TrustOnFirstUseTrustManager.java#L76-L102 |
49,310 | neo4j/neo4j-java-driver | driver/src/main/java/org/neo4j/driver/internal/security/TrustOnFirstUseTrustManager.java | TrustOnFirstUseTrustManager.fingerprint | public static String fingerprint( X509Certificate cert ) throws CertificateException
{
try
{
MessageDigest md = MessageDigest.getInstance( "SHA-512" );
md.update( cert.getEncoded() );
return ByteBufUtil.hexDump( md.digest() );
}
catch( NoSuchAlgori... | java | public static String fingerprint( X509Certificate cert ) throws CertificateException
{
try
{
MessageDigest md = MessageDigest.getInstance( "SHA-512" );
md.update( cert.getEncoded() );
return ByteBufUtil.hexDump( md.digest() );
}
catch( NoSuchAlgori... | [
"public",
"static",
"String",
"fingerprint",
"(",
"X509Certificate",
"cert",
")",
"throws",
"CertificateException",
"{",
"try",
"{",
"MessageDigest",
"md",
"=",
"MessageDigest",
".",
"getInstance",
"(",
"\"SHA-512\"",
")",
";",
"md",
".",
"update",
"(",
"cert",
... | Calculate the certificate fingerprint - simply the SHA-512 hash of the DER-encoded certificate. | [
"Calculate",
"the",
"certificate",
"fingerprint",
"-",
"simply",
"the",
"SHA",
"-",
"512",
"hash",
"of",
"the",
"DER",
"-",
"encoded",
"certificate",
"."
] | 8dad6c48251fa1ab7017e72d9998a24fa2337a22 | https://github.com/neo4j/neo4j-java-driver/blob/8dad6c48251fa1ab7017e72d9998a24fa2337a22/driver/src/main/java/org/neo4j/driver/internal/security/TrustOnFirstUseTrustManager.java#L202-L215 |
49,311 | neo4j/neo4j-java-driver | driver/src/main/java/org/neo4j/driver/internal/cluster/Rediscovery.java | Rediscovery.lookupClusterComposition | public CompletionStage<ClusterComposition> lookupClusterComposition( RoutingTable routingTable,
ConnectionPool connectionPool )
{
CompletableFuture<ClusterComposition> result = new CompletableFuture<>();
lookupClusterComposition( routingTable, connectionPool, 0, 0, result );
retu... | java | public CompletionStage<ClusterComposition> lookupClusterComposition( RoutingTable routingTable,
ConnectionPool connectionPool )
{
CompletableFuture<ClusterComposition> result = new CompletableFuture<>();
lookupClusterComposition( routingTable, connectionPool, 0, 0, result );
retu... | [
"public",
"CompletionStage",
"<",
"ClusterComposition",
">",
"lookupClusterComposition",
"(",
"RoutingTable",
"routingTable",
",",
"ConnectionPool",
"connectionPool",
")",
"{",
"CompletableFuture",
"<",
"ClusterComposition",
">",
"result",
"=",
"new",
"CompletableFuture",
... | Given the current routing table and connection pool, use the connection composition provider to fetch a new
cluster composition, which would be used to update the routing table and connection pool.
@param routingTable current routing table.
@param connectionPool connection pool.
@return new cluster composition. | [
"Given",
"the",
"current",
"routing",
"table",
"and",
"connection",
"pool",
"use",
"the",
"connection",
"composition",
"provider",
"to",
"fetch",
"a",
"new",
"cluster",
"composition",
"which",
"would",
"be",
"used",
"to",
"update",
"the",
"routing",
"table",
"... | 8dad6c48251fa1ab7017e72d9998a24fa2337a22 | https://github.com/neo4j/neo4j-java-driver/blob/8dad6c48251fa1ab7017e72d9998a24fa2337a22/driver/src/main/java/org/neo4j/driver/internal/cluster/Rediscovery.java#L87-L93 |
49,312 | neo4j/neo4j-java-driver | driver/src/main/java/org/neo4j/driver/internal/util/CertificateTool.java | CertificateTool.saveX509Cert | public static void saveX509Cert( String certStr, File certFile ) throws IOException
{
try ( BufferedWriter writer = new BufferedWriter( new FileWriter( certFile ) ) )
{
writer.write( BEGIN_CERT );
writer.newLine();
writer.write( certStr );
writer.newL... | java | public static void saveX509Cert( String certStr, File certFile ) throws IOException
{
try ( BufferedWriter writer = new BufferedWriter( new FileWriter( certFile ) ) )
{
writer.write( BEGIN_CERT );
writer.newLine();
writer.write( certStr );
writer.newL... | [
"public",
"static",
"void",
"saveX509Cert",
"(",
"String",
"certStr",
",",
"File",
"certFile",
")",
"throws",
"IOException",
"{",
"try",
"(",
"BufferedWriter",
"writer",
"=",
"new",
"BufferedWriter",
"(",
"new",
"FileWriter",
"(",
"certFile",
")",
")",
")",
... | Save a certificate to a file in base 64 binary format with BEGIN and END strings
@param certStr
@param certFile
@throws IOException | [
"Save",
"a",
"certificate",
"to",
"a",
"file",
"in",
"base",
"64",
"binary",
"format",
"with",
"BEGIN",
"and",
"END",
"strings"
] | 8dad6c48251fa1ab7017e72d9998a24fa2337a22 | https://github.com/neo4j/neo4j-java-driver/blob/8dad6c48251fa1ab7017e72d9998a24fa2337a22/driver/src/main/java/org/neo4j/driver/internal/util/CertificateTool.java#L49-L62 |
49,313 | neo4j/neo4j-java-driver | driver/src/main/java/org/neo4j/driver/internal/util/CertificateTool.java | CertificateTool.saveX509Cert | public static void saveX509Cert( Certificate cert, File certFile ) throws GeneralSecurityException, IOException
{
saveX509Cert( new Certificate[]{cert}, certFile );
} | java | public static void saveX509Cert( Certificate cert, File certFile ) throws GeneralSecurityException, IOException
{
saveX509Cert( new Certificate[]{cert}, certFile );
} | [
"public",
"static",
"void",
"saveX509Cert",
"(",
"Certificate",
"cert",
",",
"File",
"certFile",
")",
"throws",
"GeneralSecurityException",
",",
"IOException",
"{",
"saveX509Cert",
"(",
"new",
"Certificate",
"[",
"]",
"{",
"cert",
"}",
",",
"certFile",
")",
";... | Save a certificate to a file. Remove all the content in the file if there is any before.
@param cert
@param certFile
@throws GeneralSecurityException
@throws IOException | [
"Save",
"a",
"certificate",
"to",
"a",
"file",
".",
"Remove",
"all",
"the",
"content",
"in",
"the",
"file",
"if",
"there",
"is",
"any",
"before",
"."
] | 8dad6c48251fa1ab7017e72d9998a24fa2337a22 | https://github.com/neo4j/neo4j-java-driver/blob/8dad6c48251fa1ab7017e72d9998a24fa2337a22/driver/src/main/java/org/neo4j/driver/internal/util/CertificateTool.java#L72-L75 |
49,314 | neo4j/neo4j-java-driver | driver/src/main/java/org/neo4j/driver/internal/util/CertificateTool.java | CertificateTool.saveX509Cert | public static void saveX509Cert( Certificate[] certs, File certFile ) throws GeneralSecurityException, IOException
{
try ( BufferedWriter writer = new BufferedWriter( new FileWriter( certFile ) ) )
{
for ( Certificate cert : certs )
{
String certStr = Base64.g... | java | public static void saveX509Cert( Certificate[] certs, File certFile ) throws GeneralSecurityException, IOException
{
try ( BufferedWriter writer = new BufferedWriter( new FileWriter( certFile ) ) )
{
for ( Certificate cert : certs )
{
String certStr = Base64.g... | [
"public",
"static",
"void",
"saveX509Cert",
"(",
"Certificate",
"[",
"]",
"certs",
",",
"File",
"certFile",
")",
"throws",
"GeneralSecurityException",
",",
"IOException",
"{",
"try",
"(",
"BufferedWriter",
"writer",
"=",
"new",
"BufferedWriter",
"(",
"new",
"Fil... | Save a list of certificates into a file
@param certs
@param certFile
@throws GeneralSecurityException
@throws IOException | [
"Save",
"a",
"list",
"of",
"certificates",
"into",
"a",
"file"
] | 8dad6c48251fa1ab7017e72d9998a24fa2337a22 | https://github.com/neo4j/neo4j-java-driver/blob/8dad6c48251fa1ab7017e72d9998a24fa2337a22/driver/src/main/java/org/neo4j/driver/internal/util/CertificateTool.java#L85-L103 |
49,315 | neo4j/neo4j-java-driver | driver/src/main/java/org/neo4j/driver/internal/util/CertificateTool.java | CertificateTool.loadX509Cert | public static void loadX509Cert( File certFile, KeyStore keyStore ) throws GeneralSecurityException, IOException
{
try ( BufferedInputStream inputStream = new BufferedInputStream( new FileInputStream( certFile ) ) )
{
CertificateFactory certFactory = CertificateFactory.getInstance( "X.50... | java | public static void loadX509Cert( File certFile, KeyStore keyStore ) throws GeneralSecurityException, IOException
{
try ( BufferedInputStream inputStream = new BufferedInputStream( new FileInputStream( certFile ) ) )
{
CertificateFactory certFactory = CertificateFactory.getInstance( "X.50... | [
"public",
"static",
"void",
"loadX509Cert",
"(",
"File",
"certFile",
",",
"KeyStore",
"keyStore",
")",
"throws",
"GeneralSecurityException",
",",
"IOException",
"{",
"try",
"(",
"BufferedInputStream",
"inputStream",
"=",
"new",
"BufferedInputStream",
"(",
"new",
"Fi... | Load the certificates written in X.509 format in a file to a key store.
@param certFile
@param keyStore
@throws GeneralSecurityException
@throws IOException | [
"Load",
"the",
"certificates",
"written",
"in",
"X",
".",
"509",
"format",
"in",
"a",
"file",
"to",
"a",
"key",
"store",
"."
] | 8dad6c48251fa1ab7017e72d9998a24fa2337a22 | https://github.com/neo4j/neo4j-java-driver/blob/8dad6c48251fa1ab7017e72d9998a24fa2337a22/driver/src/main/java/org/neo4j/driver/internal/util/CertificateTool.java#L113-L140 |
49,316 | neo4j/neo4j-java-driver | driver/src/main/java/org/neo4j/driver/internal/util/CertificateTool.java | CertificateTool.loadX509Cert | public static void loadX509Cert( Certificate cert, String certAlias, KeyStore keyStore ) throws KeyStoreException
{
keyStore.setCertificateEntry( certAlias, cert );
} | java | public static void loadX509Cert( Certificate cert, String certAlias, KeyStore keyStore ) throws KeyStoreException
{
keyStore.setCertificateEntry( certAlias, cert );
} | [
"public",
"static",
"void",
"loadX509Cert",
"(",
"Certificate",
"cert",
",",
"String",
"certAlias",
",",
"KeyStore",
"keyStore",
")",
"throws",
"KeyStoreException",
"{",
"keyStore",
".",
"setCertificateEntry",
"(",
"certAlias",
",",
"cert",
")",
";",
"}"
] | Load a certificate to a key store with a name
@param certAlias a name to identify different certificates
@param cert
@param keyStore | [
"Load",
"a",
"certificate",
"to",
"a",
"key",
"store",
"with",
"a",
"name"
] | 8dad6c48251fa1ab7017e72d9998a24fa2337a22 | https://github.com/neo4j/neo4j-java-driver/blob/8dad6c48251fa1ab7017e72d9998a24fa2337a22/driver/src/main/java/org/neo4j/driver/internal/util/CertificateTool.java#L149-L152 |
49,317 | neo4j/neo4j-java-driver | driver/src/main/java/org/neo4j/driver/internal/util/CertificateTool.java | CertificateTool.X509CertToString | public static String X509CertToString( String cert )
{
String cert64CharPerLine = cert.replaceAll( "(.{64})", "$1\n" );
return BEGIN_CERT + "\n" + cert64CharPerLine + "\n"+ END_CERT + "\n";
} | java | public static String X509CertToString( String cert )
{
String cert64CharPerLine = cert.replaceAll( "(.{64})", "$1\n" );
return BEGIN_CERT + "\n" + cert64CharPerLine + "\n"+ END_CERT + "\n";
} | [
"public",
"static",
"String",
"X509CertToString",
"(",
"String",
"cert",
")",
"{",
"String",
"cert64CharPerLine",
"=",
"cert",
".",
"replaceAll",
"(",
"\"(.{64})\"",
",",
"\"$1\\n\"",
")",
";",
"return",
"BEGIN_CERT",
"+",
"\"\\n\"",
"+",
"cert64CharPerLine",
"+... | Convert a certificate in base 64 binary format with BEGIN and END strings
@param cert encoded cert string
@return | [
"Convert",
"a",
"certificate",
"in",
"base",
"64",
"binary",
"format",
"with",
"BEGIN",
"and",
"END",
"strings"
] | 8dad6c48251fa1ab7017e72d9998a24fa2337a22 | https://github.com/neo4j/neo4j-java-driver/blob/8dad6c48251fa1ab7017e72d9998a24fa2337a22/driver/src/main/java/org/neo4j/driver/internal/util/CertificateTool.java#L159-L163 |
49,318 | neo4j/neo4j-java-driver | driver/src/main/java/org/neo4j/driver/Statement.java | Statement.withUpdatedParameters | public Statement withUpdatedParameters( Value updates )
{
if ( updates == null || updates.isEmpty() )
{
return this;
}
else
{
Map<String,Value> newParameters = newHashMapWithSize( Math.max( parameters.size(), updates.size() ) );
newParamete... | java | public Statement withUpdatedParameters( Value updates )
{
if ( updates == null || updates.isEmpty() )
{
return this;
}
else
{
Map<String,Value> newParameters = newHashMapWithSize( Math.max( parameters.size(), updates.size() ) );
newParamete... | [
"public",
"Statement",
"withUpdatedParameters",
"(",
"Value",
"updates",
")",
"{",
"if",
"(",
"updates",
"==",
"null",
"||",
"updates",
".",
"isEmpty",
"(",
")",
")",
"{",
"return",
"this",
";",
"}",
"else",
"{",
"Map",
"<",
"String",
",",
"Value",
">"... | Create a new statement with new parameters derived by updating this'
statement's parameters using the given updates.
Every update key that points to a null value will be removed from
the new statement's parameters. All other entries will just replace
any existing parameter in the new statement.
@param updates describ... | [
"Create",
"a",
"new",
"statement",
"with",
"new",
"parameters",
"derived",
"by",
"updating",
"this",
"statement",
"s",
"parameters",
"using",
"the",
"given",
"updates",
"."
] | 8dad6c48251fa1ab7017e72d9998a24fa2337a22 | https://github.com/neo4j/neo4j-java-driver/blob/8dad6c48251fa1ab7017e72d9998a24fa2337a22/driver/src/main/java/org/neo4j/driver/Statement.java#L144-L168 |
49,319 | neo4j/neo4j-java-driver | driver/src/main/java/org/neo4j/driver/internal/BoltServerAddress.java | BoltServerAddress.resolve | public BoltServerAddress resolve() throws UnknownHostException
{
String ipAddress = InetAddress.getByName( host ).getHostAddress();
if ( ipAddress.equals( host ) )
{
return this;
}
else
{
return new BoltServerAddress( host, ipAddress, port );
... | java | public BoltServerAddress resolve() throws UnknownHostException
{
String ipAddress = InetAddress.getByName( host ).getHostAddress();
if ( ipAddress.equals( host ) )
{
return this;
}
else
{
return new BoltServerAddress( host, ipAddress, port );
... | [
"public",
"BoltServerAddress",
"resolve",
"(",
")",
"throws",
"UnknownHostException",
"{",
"String",
"ipAddress",
"=",
"InetAddress",
".",
"getByName",
"(",
"host",
")",
".",
"getHostAddress",
"(",
")",
";",
"if",
"(",
"ipAddress",
".",
"equals",
"(",
"host",
... | Resolve the host name down to an IP address, if not already resolved.
@return this instance if already resolved, otherwise a new address instance
@throws UnknownHostException if no IP address for the host could be found
@see InetAddress#getByName(String) | [
"Resolve",
"the",
"host",
"name",
"down",
"to",
"an",
"IP",
"address",
"if",
"not",
"already",
"resolved",
"."
] | 8dad6c48251fa1ab7017e72d9998a24fa2337a22 | https://github.com/neo4j/neo4j-java-driver/blob/8dad6c48251fa1ab7017e72d9998a24fa2337a22/driver/src/main/java/org/neo4j/driver/internal/BoltServerAddress.java#L121-L132 |
49,320 | dlemmermann/CalendarFX | CalendarFXGoogle/src/main/java/com/calendarfx/google/service/GoogleConnector.java | GoogleConnector.getInstance | public static GoogleConnector getInstance() {
if (instance == null) {
try {
instance = new GoogleConnector();
} catch (Exception e) {
throw new RuntimeException("The GoogleConnector could not be instanced!", e);
}
}
return insta... | java | public static GoogleConnector getInstance() {
if (instance == null) {
try {
instance = new GoogleConnector();
} catch (Exception e) {
throw new RuntimeException("The GoogleConnector could not be instanced!", e);
}
}
return insta... | [
"public",
"static",
"GoogleConnector",
"getInstance",
"(",
")",
"{",
"if",
"(",
"instance",
"==",
"null",
")",
"{",
"try",
"{",
"instance",
"=",
"new",
"GoogleConnector",
"(",
")",
";",
"}",
"catch",
"(",
"Exception",
"e",
")",
"{",
"throw",
"new",
"Ru... | On demand instance creator method used to get the single instance of this
google authenticator class.
@return The single instance of this class, if the instance does not exist,
this is immediately created. | [
"On",
"demand",
"instance",
"creator",
"method",
"used",
"to",
"get",
"the",
"single",
"instance",
"of",
"this",
"google",
"authenticator",
"class",
"."
] | f2b91c2622c3f29d004485b6426b23b86c331f96 | https://github.com/dlemmermann/CalendarFX/blob/f2b91c2622c3f29d004485b6426b23b86c331f96/CalendarFXGoogle/src/main/java/com/calendarfx/google/service/GoogleConnector.java#L116-L125 |
49,321 | dlemmermann/CalendarFX | CalendarFXGoogle/src/main/java/com/calendarfx/google/service/GoogleConnector.java | GoogleConnector.removeCredential | synchronized void removeCredential(String accountId) throws IOException {
DataStore<StoredCredential> sc = StoredCredential.getDefaultDataStore(dataStoreFactory);
sc.delete(accountId);
calendarService = null;
geoService = null;
} | java | synchronized void removeCredential(String accountId) throws IOException {
DataStore<StoredCredential> sc = StoredCredential.getDefaultDataStore(dataStoreFactory);
sc.delete(accountId);
calendarService = null;
geoService = null;
} | [
"synchronized",
"void",
"removeCredential",
"(",
"String",
"accountId",
")",
"throws",
"IOException",
"{",
"DataStore",
"<",
"StoredCredential",
">",
"sc",
"=",
"StoredCredential",
".",
"getDefaultDataStore",
"(",
"dataStoreFactory",
")",
";",
"sc",
".",
"delete",
... | Deletes the stored credentials for the given account id. This means the
next time the user must authorize the app to access his calendars.
@param accountId
The identifier of the account. | [
"Deletes",
"the",
"stored",
"credentials",
"for",
"the",
"given",
"account",
"id",
".",
"This",
"means",
"the",
"next",
"time",
"the",
"user",
"must",
"authorize",
"the",
"app",
"to",
"access",
"his",
"calendars",
"."
] | f2b91c2622c3f29d004485b6426b23b86c331f96 | https://github.com/dlemmermann/CalendarFX/blob/f2b91c2622c3f29d004485b6426b23b86c331f96/CalendarFXGoogle/src/main/java/com/calendarfx/google/service/GoogleConnector.java#L146-L151 |
49,322 | dlemmermann/CalendarFX | CalendarFXGoogle/src/main/java/com/calendarfx/google/service/GoogleConnector.java | GoogleConnector.isAuthorized | boolean isAuthorized(String accountId) {
try {
DataStore<StoredCredential> sc = StoredCredential.getDefaultDataStore(dataStoreFactory);
return sc.containsKey(accountId);
} catch (IOException e) {
return false;
}
} | java | boolean isAuthorized(String accountId) {
try {
DataStore<StoredCredential> sc = StoredCredential.getDefaultDataStore(dataStoreFactory);
return sc.containsKey(accountId);
} catch (IOException e) {
return false;
}
} | [
"boolean",
"isAuthorized",
"(",
"String",
"accountId",
")",
"{",
"try",
"{",
"DataStore",
"<",
"StoredCredential",
">",
"sc",
"=",
"StoredCredential",
".",
"getDefaultDataStore",
"(",
"dataStoreFactory",
")",
";",
"return",
"sc",
".",
"containsKey",
"(",
"accoun... | Checks if the given account id has already been authorized and the
user granted access to his calendars info.
@param accountId
The identifier of the account used internally by the application.
@return {@code true} if the account has already been set up, otherwise
{@code false}. | [
"Checks",
"if",
"the",
"given",
"account",
"id",
"has",
"already",
"been",
"authorized",
"and",
"the",
"user",
"granted",
"access",
"to",
"his",
"calendars",
"info",
"."
] | f2b91c2622c3f29d004485b6426b23b86c331f96 | https://github.com/dlemmermann/CalendarFX/blob/f2b91c2622c3f29d004485b6426b23b86c331f96/CalendarFXGoogle/src/main/java/com/calendarfx/google/service/GoogleConnector.java#L162-L169 |
49,323 | dlemmermann/CalendarFX | CalendarFXGoogle/src/main/java/com/calendarfx/google/service/GoogleConnector.java | GoogleConnector.getCalendarService | public synchronized GoogleCalendarService getCalendarService(String accountId) throws IOException {
if (calendarService == null) {
Credential credential = impl_getStoredCredential(accountId);
if (credential == null) {
throw new UnsupportedOperationException("The account h... | java | public synchronized GoogleCalendarService getCalendarService(String accountId) throws IOException {
if (calendarService == null) {
Credential credential = impl_getStoredCredential(accountId);
if (credential == null) {
throw new UnsupportedOperationException("The account h... | [
"public",
"synchronized",
"GoogleCalendarService",
"getCalendarService",
"(",
"String",
"accountId",
")",
"throws",
"IOException",
"{",
"if",
"(",
"calendarService",
"==",
"null",
")",
"{",
"Credential",
"credential",
"=",
"impl_getStoredCredential",
"(",
"accountId",
... | Instances a new calendar service for the given google account user name.
This requires previous authorization to get the service, so if the user
has not granted access to his data, this method will start the
authorization process automatically; this attempts to open the login google page in the
default browser.
@param... | [
"Instances",
"a",
"new",
"calendar",
"service",
"for",
"the",
"given",
"google",
"account",
"user",
"name",
".",
"This",
"requires",
"previous",
"authorization",
"to",
"get",
"the",
"service",
"so",
"if",
"the",
"user",
"has",
"not",
"granted",
"access",
"to... | f2b91c2622c3f29d004485b6426b23b86c331f96 | https://github.com/dlemmermann/CalendarFX/blob/f2b91c2622c3f29d004485b6426b23b86c331f96/CalendarFXGoogle/src/main/java/com/calendarfx/google/service/GoogleConnector.java#L206-L215 |
49,324 | dlemmermann/CalendarFX | CalendarFXGoogle/src/main/java/com/calendarfx/google/service/GoogleConnector.java | GoogleConnector.getAccountInfo | GoogleAccount getAccountInfo(String accountId) throws IOException {
Credential credential = impl_getStoredCredential(accountId);
if (credential == null) {
throw new UnsupportedOperationException("The account has not been authorized yet!");
}
Userinfoplus info = impl_requestUs... | java | GoogleAccount getAccountInfo(String accountId) throws IOException {
Credential credential = impl_getStoredCredential(accountId);
if (credential == null) {
throw new UnsupportedOperationException("The account has not been authorized yet!");
}
Userinfoplus info = impl_requestUs... | [
"GoogleAccount",
"getAccountInfo",
"(",
"String",
"accountId",
")",
"throws",
"IOException",
"{",
"Credential",
"credential",
"=",
"impl_getStoredCredential",
"(",
"accountId",
")",
";",
"if",
"(",
"credential",
"==",
"null",
")",
"{",
"throw",
"new",
"Unsupported... | Requests the user info for the given account. This requires previous
authorization from the user, so this might start the process.
@param accountId
The id of the account to get the user info.
@return The user info bean.
@throws IOException If the account cannot be accessed. | [
"Requests",
"the",
"user",
"info",
"for",
"the",
"given",
"account",
".",
"This",
"requires",
"previous",
"authorization",
"from",
"the",
"user",
"so",
"this",
"might",
"start",
"the",
"process",
"."
] | f2b91c2622c3f29d004485b6426b23b86c331f96 | https://github.com/dlemmermann/CalendarFX/blob/f2b91c2622c3f29d004485b6426b23b86c331f96/CalendarFXGoogle/src/main/java/com/calendarfx/google/service/GoogleConnector.java#L226-L236 |
49,325 | dlemmermann/CalendarFX | CalendarFXView/src/main/java/com/calendarfx/view/AllDayView.java | AllDayView.extraPaddingProperty | public final ObjectProperty<Insets> extraPaddingProperty() {
if (extraPadding == null) {
extraPadding = new StyleableObjectProperty<Insets>(new Insets(2, 0,
9, 0)) {
@Override
public CssMetaData<AllDayView, Insets> getCssMetaData() {
... | java | public final ObjectProperty<Insets> extraPaddingProperty() {
if (extraPadding == null) {
extraPadding = new StyleableObjectProperty<Insets>(new Insets(2, 0,
9, 0)) {
@Override
public CssMetaData<AllDayView, Insets> getCssMetaData() {
... | [
"public",
"final",
"ObjectProperty",
"<",
"Insets",
">",
"extraPaddingProperty",
"(",
")",
"{",
"if",
"(",
"extraPadding",
"==",
"null",
")",
"{",
"extraPadding",
"=",
"new",
"StyleableObjectProperty",
"<",
"Insets",
">",
"(",
"new",
"Insets",
"(",
"2",
",",... | Extra padding to be used inside of the view above and below the full day
entries. This is required as the regular padding is already used for
other styling purposes.
@return insets for extra padding | [
"Extra",
"padding",
"to",
"be",
"used",
"inside",
"of",
"the",
"view",
"above",
"and",
"below",
"the",
"full",
"day",
"entries",
".",
"This",
"is",
"required",
"as",
"the",
"regular",
"padding",
"is",
"already",
"used",
"for",
"other",
"styling",
"purposes... | f2b91c2622c3f29d004485b6426b23b86c331f96 | https://github.com/dlemmermann/CalendarFX/blob/f2b91c2622c3f29d004485b6426b23b86c331f96/CalendarFXView/src/main/java/com/calendarfx/view/AllDayView.java#L124-L147 |
49,326 | dlemmermann/CalendarFX | CalendarFXView/src/main/java/com/calendarfx/view/AllDayView.java | AllDayView.rowHeightProperty | public final DoubleProperty rowHeightProperty() {
if (rowHeight == null) {
rowHeight = new StyleableDoubleProperty(20) {
@Override
public CssMetaData<AllDayView, Number> getCssMetaData() {
return StyleableProperties.ROW_HEIGHT;
}
... | java | public final DoubleProperty rowHeightProperty() {
if (rowHeight == null) {
rowHeight = new StyleableDoubleProperty(20) {
@Override
public CssMetaData<AllDayView, Number> getCssMetaData() {
return StyleableProperties.ROW_HEIGHT;
}
... | [
"public",
"final",
"DoubleProperty",
"rowHeightProperty",
"(",
")",
"{",
"if",
"(",
"rowHeight",
"==",
"null",
")",
"{",
"rowHeight",
"=",
"new",
"StyleableDoubleProperty",
"(",
"20",
")",
"{",
"@",
"Override",
"public",
"CssMetaData",
"<",
"AllDayView",
",",
... | The height for each row shown by the view. This value determines the
total height of the view.
@return the row height property | [
"The",
"height",
"for",
"each",
"row",
"shown",
"by",
"the",
"view",
".",
"This",
"value",
"determines",
"the",
"total",
"height",
"of",
"the",
"view",
"."
] | f2b91c2622c3f29d004485b6426b23b86c331f96 | https://github.com/dlemmermann/CalendarFX/blob/f2b91c2622c3f29d004485b6426b23b86c331f96/CalendarFXView/src/main/java/com/calendarfx/view/AllDayView.java#L177-L199 |
49,327 | dlemmermann/CalendarFX | CalendarFXView/src/main/java/com/calendarfx/view/AllDayView.java | AllDayView.rowSpacingProperty | public final DoubleProperty rowSpacingProperty() {
if (rowSpacing == null) {
rowSpacing = new StyleableDoubleProperty(2) {
@Override
public CssMetaData<AllDayView, Number> getCssMetaData() {
return StyleableProperties.ROW_SPACING;
... | java | public final DoubleProperty rowSpacingProperty() {
if (rowSpacing == null) {
rowSpacing = new StyleableDoubleProperty(2) {
@Override
public CssMetaData<AllDayView, Number> getCssMetaData() {
return StyleableProperties.ROW_SPACING;
... | [
"public",
"final",
"DoubleProperty",
"rowSpacingProperty",
"(",
")",
"{",
"if",
"(",
"rowSpacing",
"==",
"null",
")",
"{",
"rowSpacing",
"=",
"new",
"StyleableDoubleProperty",
"(",
"2",
")",
"{",
"@",
"Override",
"public",
"CssMetaData",
"<",
"AllDayView",
","... | Stores the spacing between rows in the view.
@return the spacing between rows in pixels | [
"Stores",
"the",
"spacing",
"between",
"rows",
"in",
"the",
"view",
"."
] | f2b91c2622c3f29d004485b6426b23b86c331f96 | https://github.com/dlemmermann/CalendarFX/blob/f2b91c2622c3f29d004485b6426b23b86c331f96/CalendarFXView/src/main/java/com/calendarfx/view/AllDayView.java#L227-L249 |
49,328 | dlemmermann/CalendarFX | CalendarFXView/src/main/java/com/calendarfx/view/AllDayView.java | AllDayView.columnSpacingProperty | public final DoubleProperty columnSpacingProperty() {
if (columnSpacing == null) {
columnSpacing = new StyleableDoubleProperty(2) {
@Override
public CssMetaData<AllDayView, Number> getCssMetaData() {
return StyleableProperties.COLUMN_SPACING;
... | java | public final DoubleProperty columnSpacingProperty() {
if (columnSpacing == null) {
columnSpacing = new StyleableDoubleProperty(2) {
@Override
public CssMetaData<AllDayView, Number> getCssMetaData() {
return StyleableProperties.COLUMN_SPACING;
... | [
"public",
"final",
"DoubleProperty",
"columnSpacingProperty",
"(",
")",
"{",
"if",
"(",
"columnSpacing",
"==",
"null",
")",
"{",
"columnSpacing",
"=",
"new",
"StyleableDoubleProperty",
"(",
"2",
")",
"{",
"@",
"Override",
"public",
"CssMetaData",
"<",
"AllDayVie... | Stores the spacing between columns in the view.
@return the spacing between columns in pixels | [
"Stores",
"the",
"spacing",
"between",
"columns",
"in",
"the",
"view",
"."
] | f2b91c2622c3f29d004485b6426b23b86c331f96 | https://github.com/dlemmermann/CalendarFX/blob/f2b91c2622c3f29d004485b6426b23b86c331f96/CalendarFXView/src/main/java/com/calendarfx/view/AllDayView.java#L281-L303 |
49,329 | dlemmermann/CalendarFX | CalendarFXView/src/main/java/com/calendarfx/view/print/PrintView.java | PrintView.show | public void show(Window owner) {
InvalidationListener viewTypeListener = obs -> loadDropDownValues(getDate());
if (dialog != null) {
dialog.show();
} else {
TimeRangeView timeRange = getSettingsView().getTimeRangeView();
Scene scene = new Scene(this);... | java | public void show(Window owner) {
InvalidationListener viewTypeListener = obs -> loadDropDownValues(getDate());
if (dialog != null) {
dialog.show();
} else {
TimeRangeView timeRange = getSettingsView().getTimeRangeView();
Scene scene = new Scene(this);... | [
"public",
"void",
"show",
"(",
"Window",
"owner",
")",
"{",
"InvalidationListener",
"viewTypeListener",
"=",
"obs",
"->",
"loadDropDownValues",
"(",
"getDate",
"(",
")",
")",
";",
"if",
"(",
"dialog",
"!=",
"null",
")",
"{",
"dialog",
".",
"show",
"(",
"... | Creates an application-modal dialog and shows it after adding the print
view to it.
@param owner
the owner window of the dialog | [
"Creates",
"an",
"application",
"-",
"modal",
"dialog",
"and",
"shows",
"it",
"after",
"adding",
"the",
"print",
"view",
"to",
"it",
"."
] | f2b91c2622c3f29d004485b6426b23b86c331f96 | https://github.com/dlemmermann/CalendarFX/blob/f2b91c2622c3f29d004485b6426b23b86c331f96/CalendarFXView/src/main/java/com/calendarfx/view/print/PrintView.java#L417-L444 |
49,330 | dlemmermann/CalendarFX | CalendarFXRecurrence/src/main/java/com/google/ical/values/RRule.java | RRule.approximateIntervalInDays | public int approximateIntervalInDays() {
int freqLengthDays;
int nPerPeriod = 0;
switch (this.freq) {
case DAILY:
freqLengthDays = 1;
break;
case WEEKLY:
freqLengthDays = 7;
if (!this.byDay.isEmpty()) {
... | java | public int approximateIntervalInDays() {
int freqLengthDays;
int nPerPeriod = 0;
switch (this.freq) {
case DAILY:
freqLengthDays = 1;
break;
case WEEKLY:
freqLengthDays = 7;
if (!this.byDay.isEmpty()) {
... | [
"public",
"int",
"approximateIntervalInDays",
"(",
")",
"{",
"int",
"freqLengthDays",
";",
"int",
"nPerPeriod",
"=",
"0",
";",
"switch",
"(",
"this",
".",
"freq",
")",
"{",
"case",
"DAILY",
":",
"freqLengthDays",
"=",
"1",
";",
"break",
";",
"case",
"WEE... | an approximate number of days between occurences. | [
"an",
"approximate",
"number",
"of",
"days",
"between",
"occurences",
"."
] | f2b91c2622c3f29d004485b6426b23b86c331f96 | https://github.com/dlemmermann/CalendarFX/blob/f2b91c2622c3f29d004485b6426b23b86c331f96/CalendarFXRecurrence/src/main/java/com/google/ical/values/RRule.java#L150-L205 |
49,331 | dlemmermann/CalendarFX | CalendarFXRecurrence/src/main/java/com/google/ical/values/RDateList.java | RDateList.toIcal | public String toIcal() {
StringBuilder buf = new StringBuilder();
buf.append(this.getName().toUpperCase());
buf.append(";TZID=\"").append(tzid.getID()).append('"');
buf.append(";VALUE=").append(valueType.toIcal());
if (hasExtParams()) {
for (Map.Entry<String, String> ... | java | public String toIcal() {
StringBuilder buf = new StringBuilder();
buf.append(this.getName().toUpperCase());
buf.append(";TZID=\"").append(tzid.getID()).append('"');
buf.append(";VALUE=").append(valueType.toIcal());
if (hasExtParams()) {
for (Map.Entry<String, String> ... | [
"public",
"String",
"toIcal",
"(",
")",
"{",
"StringBuilder",
"buf",
"=",
"new",
"StringBuilder",
"(",
")",
";",
"buf",
".",
"append",
"(",
"this",
".",
"getName",
"(",
")",
".",
"toUpperCase",
"(",
")",
")",
";",
"buf",
".",
"append",
"(",
"\";TZID=... | returns a String containing ical content lines. | [
"returns",
"a",
"String",
"containing",
"ical",
"content",
"lines",
"."
] | f2b91c2622c3f29d004485b6426b23b86c331f96 | https://github.com/dlemmermann/CalendarFX/blob/f2b91c2622c3f29d004485b6426b23b86c331f96/CalendarFXRecurrence/src/main/java/com/google/ical/values/RDateList.java#L86-L113 |
49,332 | dlemmermann/CalendarFX | CalendarFXRecurrence/src/main/java/com/google/ical/iter/Filters.java | Filters.byDayFilter | static Predicate<DateValue> byDayFilter(
final WeekdayNum[] days, final boolean weeksInYear, final Weekday wkst) {
return new Predicate<DateValue>() {
public boolean apply(DateValue date) {
Weekday dow = Weekday.valueOf(date);
int nDays;
/... | java | static Predicate<DateValue> byDayFilter(
final WeekdayNum[] days, final boolean weeksInYear, final Weekday wkst) {
return new Predicate<DateValue>() {
public boolean apply(DateValue date) {
Weekday dow = Weekday.valueOf(date);
int nDays;
/... | [
"static",
"Predicate",
"<",
"DateValue",
">",
"byDayFilter",
"(",
"final",
"WeekdayNum",
"[",
"]",
"days",
",",
"final",
"boolean",
"weeksInYear",
",",
"final",
"Weekday",
"wkst",
")",
"{",
"return",
"new",
"Predicate",
"<",
"DateValue",
">",
"(",
")",
"{"... | constructs a day filter based on a BYDAY rule.
@param days non null
@param weeksInYear are the week numbers meant to be weeks in the
current year, or weeks in the current month. | [
"constructs",
"a",
"day",
"filter",
"based",
"on",
"a",
"BYDAY",
"rule",
"."
] | f2b91c2622c3f29d004485b6426b23b86c331f96 | https://github.com/dlemmermann/CalendarFX/blob/f2b91c2622c3f29d004485b6426b23b86c331f96/CalendarFXRecurrence/src/main/java/com/google/ical/iter/Filters.java#L54-L116 |
49,333 | dlemmermann/CalendarFX | CalendarFXRecurrence/src/main/java/com/google/ical/iter/Filters.java | Filters.weekIntervalFilter | static Predicate<DateValue> weekIntervalFilter(
final int interval, final Weekday wkst, final DateValue dtStart) {
return new Predicate<DateValue>() {
DateValue wkStart;
{
// the latest day with day of week wkst on or before dtStart
DTBuilder ... | java | static Predicate<DateValue> weekIntervalFilter(
final int interval, final Weekday wkst, final DateValue dtStart) {
return new Predicate<DateValue>() {
DateValue wkStart;
{
// the latest day with day of week wkst on or before dtStart
DTBuilder ... | [
"static",
"Predicate",
"<",
"DateValue",
">",
"weekIntervalFilter",
"(",
"final",
"int",
"interval",
",",
"final",
"Weekday",
"wkst",
",",
"final",
"DateValue",
"dtStart",
")",
"{",
"return",
"new",
"Predicate",
"<",
"DateValue",
">",
"(",
")",
"{",
"DateVal... | constructs a filter that accepts only every interval-th week from the week
containing dtStart.
@param interval > 0 number of weeks
@param wkst day of the week that the week starts on.
@param dtStart non null | [
"constructs",
"a",
"filter",
"that",
"accepts",
"only",
"every",
"interval",
"-",
"th",
"week",
"from",
"the",
"week",
"containing",
"dtStart",
"."
] | f2b91c2622c3f29d004485b6426b23b86c331f96 | https://github.com/dlemmermann/CalendarFX/blob/f2b91c2622c3f29d004485b6426b23b86c331f96/CalendarFXRecurrence/src/main/java/com/google/ical/iter/Filters.java#L147-L170 |
49,334 | dlemmermann/CalendarFX | CalendarFXRecurrence/src/main/java/com/google/ical/iter/Filters.java | Filters.byMinuteFilter | static Predicate<DateValue> byMinuteFilter(int[] minutes) {
long minutesByBit = 0;
for (int minute : minutes) {
minutesByBit |= 1L << minute;
}
if ((minutesByBit & LOW_60_BITS) == LOW_60_BITS) {
return Predicates.alwaysTrue();
}
final long bitField... | java | static Predicate<DateValue> byMinuteFilter(int[] minutes) {
long minutesByBit = 0;
for (int minute : minutes) {
minutesByBit |= 1L << minute;
}
if ((minutesByBit & LOW_60_BITS) == LOW_60_BITS) {
return Predicates.alwaysTrue();
}
final long bitField... | [
"static",
"Predicate",
"<",
"DateValue",
">",
"byMinuteFilter",
"(",
"int",
"[",
"]",
"minutes",
")",
"{",
"long",
"minutesByBit",
"=",
"0",
";",
"for",
"(",
"int",
"minute",
":",
"minutes",
")",
"{",
"minutesByBit",
"|=",
"1L",
"<<",
"minute",
";",
"}... | constructs a minute filter based on a BYMINUTE rule.
@param minutes minutes of the hour in [0, 59] | [
"constructs",
"a",
"minute",
"filter",
"based",
"on",
"a",
"BYMINUTE",
"rule",
"."
] | f2b91c2622c3f29d004485b6426b23b86c331f96 | https://github.com/dlemmermann/CalendarFX/blob/f2b91c2622c3f29d004485b6426b23b86c331f96/CalendarFXRecurrence/src/main/java/com/google/ical/iter/Filters.java#L203-L221 |
49,335 | dlemmermann/CalendarFX | CalendarFXRecurrence/src/main/java/com/google/ical/iter/Filters.java | Filters.bySecondFilter | static Predicate<DateValue> bySecondFilter(int[] seconds) {
long secondsByBit = 0;
for (int second : seconds) {
secondsByBit |= 1L << second;
}
if ((secondsByBit & LOW_60_BITS) == LOW_60_BITS) {
return Predicates.alwaysTrue();
}
final long bitField... | java | static Predicate<DateValue> bySecondFilter(int[] seconds) {
long secondsByBit = 0;
for (int second : seconds) {
secondsByBit |= 1L << second;
}
if ((secondsByBit & LOW_60_BITS) == LOW_60_BITS) {
return Predicates.alwaysTrue();
}
final long bitField... | [
"static",
"Predicate",
"<",
"DateValue",
">",
"bySecondFilter",
"(",
"int",
"[",
"]",
"seconds",
")",
"{",
"long",
"secondsByBit",
"=",
"0",
";",
"for",
"(",
"int",
"second",
":",
"seconds",
")",
"{",
"secondsByBit",
"|=",
"1L",
"<<",
"second",
";",
"}... | constructs a second filter based on a BYMINUTE rule.
@param seconds seconds of the minute in [0, 59] | [
"constructs",
"a",
"second",
"filter",
"based",
"on",
"a",
"BYMINUTE",
"rule",
"."
] | f2b91c2622c3f29d004485b6426b23b86c331f96 | https://github.com/dlemmermann/CalendarFX/blob/f2b91c2622c3f29d004485b6426b23b86c331f96/CalendarFXRecurrence/src/main/java/com/google/ical/iter/Filters.java#L228-L246 |
49,336 | dlemmermann/CalendarFX | CalendarFXView/src/main/java/com/calendarfx/view/MonthSheetView.java | MonthSheetView.isExtendedMonth | public final boolean isExtendedMonth(YearMonth month) {
if (month != null) {
YearMonth extendedStart = getExtendedStartMonth();
if ((month.equals(extendedStart) || month.isAfter(extendedStart)) && month.isBefore(getStartMonth())) {
return true;
}
... | java | public final boolean isExtendedMonth(YearMonth month) {
if (month != null) {
YearMonth extendedStart = getExtendedStartMonth();
if ((month.equals(extendedStart) || month.isAfter(extendedStart)) && month.isBefore(getStartMonth())) {
return true;
}
... | [
"public",
"final",
"boolean",
"isExtendedMonth",
"(",
"YearMonth",
"month",
")",
"{",
"if",
"(",
"month",
"!=",
"null",
")",
"{",
"YearMonth",
"extendedStart",
"=",
"getExtendedStartMonth",
"(",
")",
";",
"if",
"(",
"(",
"month",
".",
"equals",
"(",
"exten... | A simple check to see if the given month is part of the extended months.
@param month the month to check
@return true if the given month is part of the extended months
@see #setExtendedViewUnit(ViewUnit)
@see #setExtendedUnitsBackward(int)
@see #setExtendedUnitsForward(int) | [
"A",
"simple",
"check",
"to",
"see",
"if",
"the",
"given",
"month",
"is",
"part",
"of",
"the",
"extended",
"months",
"."
] | f2b91c2622c3f29d004485b6426b23b86c331f96 | https://github.com/dlemmermann/CalendarFX/blob/f2b91c2622c3f29d004485b6426b23b86c331f96/CalendarFXView/src/main/java/com/calendarfx/view/MonthSheetView.java#L495-L508 |
49,337 | dlemmermann/CalendarFX | CalendarFXView/src/main/java/com/calendarfx/view/MonthSheetView.java | MonthSheetView.isVisibleDate | public final boolean isVisibleDate(LocalDate date) {
if (date != null) {
YearMonth extendedStart = getExtendedStartMonth();
YearMonth extendedEnd = getExtendedEndMonth();
LocalDate startDate = extendedStart.atDay(1);
LocalDate endDate = extendedEnd.atEndOfMonth()... | java | public final boolean isVisibleDate(LocalDate date) {
if (date != null) {
YearMonth extendedStart = getExtendedStartMonth();
YearMonth extendedEnd = getExtendedEndMonth();
LocalDate startDate = extendedStart.atDay(1);
LocalDate endDate = extendedEnd.atEndOfMonth()... | [
"public",
"final",
"boolean",
"isVisibleDate",
"(",
"LocalDate",
"date",
")",
"{",
"if",
"(",
"date",
"!=",
"null",
")",
"{",
"YearMonth",
"extendedStart",
"=",
"getExtendedStartMonth",
"(",
")",
";",
"YearMonth",
"extendedEnd",
"=",
"getExtendedEndMonth",
"(",
... | Determines if the given date is currently showing is part of the view. This
method uses the extended start and end months.
@param date the date to check for visibility
@return true if the date is within the time range of the view
@see #getExtendedStartMonth()
@see #getExtendedEndMonth() | [
"Determines",
"if",
"the",
"given",
"date",
"is",
"currently",
"showing",
"is",
"part",
"of",
"the",
"view",
".",
"This",
"method",
"uses",
"the",
"extended",
"start",
"and",
"end",
"months",
"."
] | f2b91c2622c3f29d004485b6426b23b86c331f96 | https://github.com/dlemmermann/CalendarFX/blob/f2b91c2622c3f29d004485b6426b23b86c331f96/CalendarFXView/src/main/java/com/calendarfx/view/MonthSheetView.java#L519-L532 |
49,338 | dlemmermann/CalendarFX | CalendarFXRecurrence/src/main/java/com/google/ical/util/TimeUtils.java | TimeUtils.secsSinceEpoch | public static long secsSinceEpoch(DateValue date) {
long result = fixedFromGregorian(date) *
SECS_PER_DAY;
if (date instanceof TimeValue) {
TimeValue time = (TimeValue) date;
result +=
time.second() +
60 * (time.minu... | java | public static long secsSinceEpoch(DateValue date) {
long result = fixedFromGregorian(date) *
SECS_PER_DAY;
if (date instanceof TimeValue) {
TimeValue time = (TimeValue) date;
result +=
time.second() +
60 * (time.minu... | [
"public",
"static",
"long",
"secsSinceEpoch",
"(",
"DateValue",
"date",
")",
"{",
"long",
"result",
"=",
"fixedFromGregorian",
"(",
"date",
")",
"*",
"SECS_PER_DAY",
";",
"if",
"(",
"date",
"instanceof",
"TimeValue",
")",
"{",
"TimeValue",
"time",
"=",
"(",
... | Compute the number of seconds from the Proleptic Gregorian epoch
to the given time. | [
"Compute",
"the",
"number",
"of",
"seconds",
"from",
"the",
"Proleptic",
"Gregorian",
"epoch",
"to",
"the",
"given",
"time",
"."
] | f2b91c2622c3f29d004485b6426b23b86c331f96 | https://github.com/dlemmermann/CalendarFX/blob/f2b91c2622c3f29d004485b6426b23b86c331f96/CalendarFXRecurrence/src/main/java/com/google/ical/util/TimeUtils.java#L249-L260 |
49,339 | dlemmermann/CalendarFX | CalendarFXRecurrence/src/main/java/com/google/ical/util/TimeUtils.java | TimeUtils.toDateValue | public static DateValue toDateValue(DateValue dv) {
return (!(dv instanceof TimeValue) ? dv
: new DateValueImpl(dv.year(), dv.month(), dv.day()));
} | java | public static DateValue toDateValue(DateValue dv) {
return (!(dv instanceof TimeValue) ? dv
: new DateValueImpl(dv.year(), dv.month(), dv.day()));
} | [
"public",
"static",
"DateValue",
"toDateValue",
"(",
"DateValue",
"dv",
")",
"{",
"return",
"(",
"!",
"(",
"dv",
"instanceof",
"TimeValue",
")",
"?",
"dv",
":",
"new",
"DateValueImpl",
"(",
"dv",
".",
"year",
"(",
")",
",",
"dv",
".",
"month",
"(",
"... | a DateValue with the same year, month, and day as the given instance that
is not a TimeValue. | [
"a",
"DateValue",
"with",
"the",
"same",
"year",
"month",
"and",
"day",
"as",
"the",
"given",
"instance",
"that",
"is",
"not",
"a",
"TimeValue",
"."
] | f2b91c2622c3f29d004485b6426b23b86c331f96 | https://github.com/dlemmermann/CalendarFX/blob/f2b91c2622c3f29d004485b6426b23b86c331f96/CalendarFXRecurrence/src/main/java/com/google/ical/util/TimeUtils.java#L270-L273 |
49,340 | dlemmermann/CalendarFX | CalendarFXView/src/main/java/com/calendarfx/view/Messages.java | Messages.getString | public static String getString(String key) {
try {
return RESOURCE_BUNDLE.getString(key);
} catch (MissingResourceException e) {
return '!' + key + '!';
}
} | java | public static String getString(String key) {
try {
return RESOURCE_BUNDLE.getString(key);
} catch (MissingResourceException e) {
return '!' + key + '!';
}
} | [
"public",
"static",
"String",
"getString",
"(",
"String",
"key",
")",
"{",
"try",
"{",
"return",
"RESOURCE_BUNDLE",
".",
"getString",
"(",
"key",
")",
";",
"}",
"catch",
"(",
"MissingResourceException",
"e",
")",
"{",
"return",
"'",
"'",
"+",
"key",
"+",... | Returns the translation for the given key.
@param key the i18n key
@return the translation | [
"Returns",
"the",
"translation",
"for",
"the",
"given",
"key",
"."
] | f2b91c2622c3f29d004485b6426b23b86c331f96 | https://github.com/dlemmermann/CalendarFX/blob/f2b91c2622c3f29d004485b6426b23b86c331f96/CalendarFXView/src/main/java/com/calendarfx/view/Messages.java#L41-L47 |
49,341 | dlemmermann/CalendarFX | CalendarFXView/src/main/java/impl/com/calendarfx/view/DayEntryViewSkin.java | DayEntryViewSkin.updateStyles | protected void updateStyles() {
DayEntryView view = getSkinnable();
Entry<?> entry = getEntry();
Calendar calendar = entry.getCalendar();
if (entry instanceof DraggedEntry) {
calendar = ((DraggedEntry) entry).getOriginalCalendar();
}
// when the entry gets r... | java | protected void updateStyles() {
DayEntryView view = getSkinnable();
Entry<?> entry = getEntry();
Calendar calendar = entry.getCalendar();
if (entry instanceof DraggedEntry) {
calendar = ((DraggedEntry) entry).getOriginalCalendar();
}
// when the entry gets r... | [
"protected",
"void",
"updateStyles",
"(",
")",
"{",
"DayEntryView",
"view",
"=",
"getSkinnable",
"(",
")",
";",
"Entry",
"<",
"?",
">",
"entry",
"=",
"getEntry",
"(",
")",
";",
"Calendar",
"calendar",
"=",
"entry",
".",
"getCalendar",
"(",
")",
";",
"i... | This methods updates the styles of the node according to the entry
settings. | [
"This",
"methods",
"updates",
"the",
"styles",
"of",
"the",
"node",
"according",
"to",
"the",
"entry",
"settings",
"."
] | f2b91c2622c3f29d004485b6426b23b86c331f96 | https://github.com/dlemmermann/CalendarFX/blob/f2b91c2622c3f29d004485b6426b23b86c331f96/CalendarFXView/src/main/java/impl/com/calendarfx/view/DayEntryViewSkin.java#L99-L127 |
49,342 | dlemmermann/CalendarFX | CalendarFXView/src/main/java/impl/com/calendarfx/view/DayEntryViewSkin.java | DayEntryViewSkin.createTitleLabel | protected Label createTitleLabel() {
Label label = new Label();
label.setWrapText(true);
label.setMinSize(0, 0);
return label;
} | java | protected Label createTitleLabel() {
Label label = new Label();
label.setWrapText(true);
label.setMinSize(0, 0);
return label;
} | [
"protected",
"Label",
"createTitleLabel",
"(",
")",
"{",
"Label",
"label",
"=",
"new",
"Label",
"(",
")",
";",
"label",
".",
"setWrapText",
"(",
"true",
")",
";",
"label",
".",
"setMinSize",
"(",
"0",
",",
"0",
")",
";",
"return",
"label",
";",
"}"
] | The label used to show the title.
@returns The title component. | [
"The",
"label",
"used",
"to",
"show",
"the",
"title",
"."
] | f2b91c2622c3f29d004485b6426b23b86c331f96 | https://github.com/dlemmermann/CalendarFX/blob/f2b91c2622c3f29d004485b6426b23b86c331f96/CalendarFXView/src/main/java/impl/com/calendarfx/view/DayEntryViewSkin.java#L165-L171 |
49,343 | dlemmermann/CalendarFX | CalendarFXView/src/main/java/impl/com/calendarfx/view/DayEntryViewSkin.java | DayEntryViewSkin.updateLabels | protected void updateLabels() {
Entry<?> entry = getEntry();
startTimeLabel.setText(formatTime(entry.getStartTime()));
titleLabel.setText(formatTitle(entry.getTitle()));
} | java | protected void updateLabels() {
Entry<?> entry = getEntry();
startTimeLabel.setText(formatTime(entry.getStartTime()));
titleLabel.setText(formatTitle(entry.getTitle()));
} | [
"protected",
"void",
"updateLabels",
"(",
")",
"{",
"Entry",
"<",
"?",
">",
"entry",
"=",
"getEntry",
"(",
")",
";",
"startTimeLabel",
".",
"setText",
"(",
"formatTime",
"(",
"entry",
".",
"getStartTime",
"(",
")",
")",
")",
";",
"titleLabel",
".",
"se... | This method will be called if the labels need to be updated. | [
"This",
"method",
"will",
"be",
"called",
"if",
"the",
"labels",
"need",
"to",
"be",
"updated",
"."
] | f2b91c2622c3f29d004485b6426b23b86c331f96 | https://github.com/dlemmermann/CalendarFX/blob/f2b91c2622c3f29d004485b6426b23b86c331f96/CalendarFXView/src/main/java/impl/com/calendarfx/view/DayEntryViewSkin.java#L176-L181 |
49,344 | dlemmermann/CalendarFX | CalendarFXRecurrence/src/main/java/com/google/ical/iter/Util.java | Util.rollToNextWeekStart | static void rollToNextWeekStart(DTBuilder builder, Weekday wkst) {
DateValue bd = builder.toDate();
builder.day += (7 - ((7 + (Weekday.valueOf(bd).javaDayNum
- wkst.javaDayNum))
% 7)) % 7;
builder.normalize();
} | java | static void rollToNextWeekStart(DTBuilder builder, Weekday wkst) {
DateValue bd = builder.toDate();
builder.day += (7 - ((7 + (Weekday.valueOf(bd).javaDayNum
- wkst.javaDayNum))
% 7)) % 7;
builder.normalize();
} | [
"static",
"void",
"rollToNextWeekStart",
"(",
"DTBuilder",
"builder",
",",
"Weekday",
"wkst",
")",
"{",
"DateValue",
"bd",
"=",
"builder",
".",
"toDate",
"(",
")",
";",
"builder",
".",
"day",
"+=",
"(",
"7",
"-",
"(",
"(",
"7",
"+",
"(",
"Weekday",
"... | advances builder to the earliest day on or after builder that falls on
wkst.
@param builder non null.
@param wkst the day of the week that the week starts on | [
"advances",
"builder",
"to",
"the",
"earliest",
"day",
"on",
"or",
"after",
"builder",
"that",
"falls",
"on",
"wkst",
"."
] | f2b91c2622c3f29d004485b6426b23b86c331f96 | https://github.com/dlemmermann/CalendarFX/blob/f2b91c2622c3f29d004485b6426b23b86c331f96/CalendarFXRecurrence/src/main/java/com/google/ical/iter/Util.java#L41-L47 |
49,345 | dlemmermann/CalendarFX | CalendarFXRecurrence/src/main/java/com/google/ical/iter/Util.java | Util.nextWeekStart | static DateValue nextWeekStart(DateValue d, Weekday wkst) {
DTBuilder builder = new DTBuilder(d);
builder.day += (7 - ((7 + (Weekday.valueOf(d).javaDayNum
- wkst.javaDayNum)) % 7))
% 7;
return builder.toDate();
} | java | static DateValue nextWeekStart(DateValue d, Weekday wkst) {
DTBuilder builder = new DTBuilder(d);
builder.day += (7 - ((7 + (Weekday.valueOf(d).javaDayNum
- wkst.javaDayNum)) % 7))
% 7;
return builder.toDate();
} | [
"static",
"DateValue",
"nextWeekStart",
"(",
"DateValue",
"d",
",",
"Weekday",
"wkst",
")",
"{",
"DTBuilder",
"builder",
"=",
"new",
"DTBuilder",
"(",
"d",
")",
";",
"builder",
".",
"day",
"+=",
"(",
"7",
"-",
"(",
"(",
"7",
"+",
"(",
"Weekday",
".",... | the earliest day on or after d that falls on wkst.
@param wkst the day of the week that the week starts on | [
"the",
"earliest",
"day",
"on",
"or",
"after",
"d",
"that",
"falls",
"on",
"wkst",
"."
] | f2b91c2622c3f29d004485b6426b23b86c331f96 | https://github.com/dlemmermann/CalendarFX/blob/f2b91c2622c3f29d004485b6426b23b86c331f96/CalendarFXRecurrence/src/main/java/com/google/ical/iter/Util.java#L53-L59 |
49,346 | dlemmermann/CalendarFX | CalendarFXRecurrence/src/main/java/com/google/ical/iter/Util.java | Util.uniquify | static int[] uniquify(int[] ints, int start, int end) {
IntSet iset = new IntSet();
for (int i = end; --i >= start; ) {
iset.add(ints[i]);
}
return iset.toIntArray();
} | java | static int[] uniquify(int[] ints, int start, int end) {
IntSet iset = new IntSet();
for (int i = end; --i >= start; ) {
iset.add(ints[i]);
}
return iset.toIntArray();
} | [
"static",
"int",
"[",
"]",
"uniquify",
"(",
"int",
"[",
"]",
"ints",
",",
"int",
"start",
",",
"int",
"end",
")",
"{",
"IntSet",
"iset",
"=",
"new",
"IntSet",
"(",
")",
";",
"for",
"(",
"int",
"i",
"=",
"end",
";",
"--",
"i",
">=",
"start",
"... | returns a sorted unique copy of ints. | [
"returns",
"a",
"sorted",
"unique",
"copy",
"of",
"ints",
"."
] | f2b91c2622c3f29d004485b6426b23b86c331f96 | https://github.com/dlemmermann/CalendarFX/blob/f2b91c2622c3f29d004485b6426b23b86c331f96/CalendarFXRecurrence/src/main/java/com/google/ical/iter/Util.java#L67-L73 |
49,347 | dlemmermann/CalendarFX | CalendarFXRecurrence/src/main/java/com/google/ical/iter/Util.java | Util.dayNumToDate | static int dayNumToDate(Weekday dow0, int nDays, int weekNum,
Weekday dow, int d0, int nDaysInMonth) {
// if dow is wednesday, then this is the date of the first wednesday
int firstDateOfGivenDow = 1 + ((7 + dow.javaDayNum - dow0.javaDayNum) % 7);
int date;
i... | java | static int dayNumToDate(Weekday dow0, int nDays, int weekNum,
Weekday dow, int d0, int nDaysInMonth) {
// if dow is wednesday, then this is the date of the first wednesday
int firstDateOfGivenDow = 1 + ((7 + dow.javaDayNum - dow0.javaDayNum) % 7);
int date;
i... | [
"static",
"int",
"dayNumToDate",
"(",
"Weekday",
"dow0",
",",
"int",
"nDays",
",",
"int",
"weekNum",
",",
"Weekday",
"dow",
",",
"int",
"d0",
",",
"int",
"nDaysInMonth",
")",
"{",
"// if dow is wednesday, then this is the date of the first wednesday",
"int",
"firstD... | given a weekday number, such as -1SU, returns the day of the month that it
falls on.
The weekday number may be refer to a week in the current month in some
contexts or a week in the current year in other contexts.
@param dow0 the day of week of the first day in the current year/month.
@param nDays the number of days in... | [
"given",
"a",
"weekday",
"number",
"such",
"as",
"-",
"1SU",
"returns",
"the",
"day",
"of",
"the",
"month",
"that",
"it",
"falls",
"on",
".",
"The",
"weekday",
"number",
"may",
"be",
"refer",
"to",
"a",
"week",
"in",
"the",
"current",
"month",
"in",
... | f2b91c2622c3f29d004485b6426b23b86c331f96 | https://github.com/dlemmermann/CalendarFX/blob/f2b91c2622c3f29d004485b6426b23b86c331f96/CalendarFXRecurrence/src/main/java/com/google/ical/iter/Util.java#L89-L108 |
49,348 | dlemmermann/CalendarFX | CalendarFXRecurrence/src/main/java/com/google/ical/iter/Util.java | Util.invertWeekdayNum | static int invertWeekdayNum(
WeekdayNum weekdayNum, Weekday dow0, int nDays) {
assert weekdayNum.num < 0;
// how many are there of that week?
return countInPeriod(weekdayNum.wday, dow0, nDays) + weekdayNum.num + 1;
} | java | static int invertWeekdayNum(
WeekdayNum weekdayNum, Weekday dow0, int nDays) {
assert weekdayNum.num < 0;
// how many are there of that week?
return countInPeriod(weekdayNum.wday, dow0, nDays) + weekdayNum.num + 1;
} | [
"static",
"int",
"invertWeekdayNum",
"(",
"WeekdayNum",
"weekdayNum",
",",
"Weekday",
"dow0",
",",
"int",
"nDays",
")",
"{",
"assert",
"weekdayNum",
".",
"num",
"<",
"0",
";",
"// how many are there of that week?",
"return",
"countInPeriod",
"(",
"weekdayNum",
"."... | Compute an absolute week number given a relative one.
The day number -1SU refers to the last Sunday, so if there are 5 Sundays
in a period that starts on dow0 with nDays, then -1SU is 5SU.
Depending on where its used it may refer to the last Sunday of the year
or of the month.
@param weekdayNum -1SU in the example abo... | [
"Compute",
"an",
"absolute",
"week",
"number",
"given",
"a",
"relative",
"one",
".",
"The",
"day",
"number",
"-",
"1SU",
"refers",
"to",
"the",
"last",
"Sunday",
"so",
"if",
"there",
"are",
"5",
"Sundays",
"in",
"a",
"period",
"that",
"starts",
"on",
"... | f2b91c2622c3f29d004485b6426b23b86c331f96 | https://github.com/dlemmermann/CalendarFX/blob/f2b91c2622c3f29d004485b6426b23b86c331f96/CalendarFXRecurrence/src/main/java/com/google/ical/iter/Util.java#L124-L129 |
49,349 | dlemmermann/CalendarFX | CalendarFXRecurrence/src/main/java/com/google/ical/iter/Util.java | Util.countInPeriod | static int countInPeriod(Weekday dow, Weekday dow0, int nDays) {
// Two cases
// (1a) dow >= dow0: count === (nDays - (dow - dow0)) / 7
// (1b) dow < dow0: count === (nDays - (7 - dow0 - dow)) / 7
if (dow.javaDayNum >= dow0.javaDayNum) {
return 1 + ((nDays - (dow.javaD... | java | static int countInPeriod(Weekday dow, Weekday dow0, int nDays) {
// Two cases
// (1a) dow >= dow0: count === (nDays - (dow - dow0)) / 7
// (1b) dow < dow0: count === (nDays - (7 - dow0 - dow)) / 7
if (dow.javaDayNum >= dow0.javaDayNum) {
return 1 + ((nDays - (dow.javaD... | [
"static",
"int",
"countInPeriod",
"(",
"Weekday",
"dow",
",",
"Weekday",
"dow0",
",",
"int",
"nDays",
")",
"{",
"// Two cases",
"// (1a) dow >= dow0: count === (nDays - (dow - dow0)) / 7",
"// (1b) dow < dow0: count === (nDays - (7 - dow0 - dow)) / 7",
"if",
"(",
"dow",
... | the number of occurences of dow in a period nDays long where the first day
of the period has day of week dow0. | [
"the",
"number",
"of",
"occurences",
"of",
"dow",
"in",
"a",
"period",
"nDays",
"long",
"where",
"the",
"first",
"day",
"of",
"the",
"period",
"has",
"day",
"of",
"week",
"dow0",
"."
] | f2b91c2622c3f29d004485b6426b23b86c331f96 | https://github.com/dlemmermann/CalendarFX/blob/f2b91c2622c3f29d004485b6426b23b86c331f96/CalendarFXRecurrence/src/main/java/com/google/ical/iter/Util.java#L135-L144 |
49,350 | dlemmermann/CalendarFX | CalendarFXGoogle/src/main/java/com/calendarfx/google/view/data/GoogleCalendarData.java | GoogleCalendarData.getUnloadedSlices | public List<Slice> getUnloadedSlices(List<Slice> slices) {
List<Slice> unloadedSlices = new ArrayList<>(slices);
unloadedSlices.removeAll(loadedSlices);
unloadedSlices.removeAll(inProgressSlices);
return unloadedSlices;
} | java | public List<Slice> getUnloadedSlices(List<Slice> slices) {
List<Slice> unloadedSlices = new ArrayList<>(slices);
unloadedSlices.removeAll(loadedSlices);
unloadedSlices.removeAll(inProgressSlices);
return unloadedSlices;
} | [
"public",
"List",
"<",
"Slice",
">",
"getUnloadedSlices",
"(",
"List",
"<",
"Slice",
">",
"slices",
")",
"{",
"List",
"<",
"Slice",
">",
"unloadedSlices",
"=",
"new",
"ArrayList",
"<>",
"(",
"slices",
")",
";",
"unloadedSlices",
".",
"removeAll",
"(",
"l... | Takes the list of slices and removes those already loaded.
@param slices the slices to be processed.
@return A new list containing the unloaded slices. | [
"Takes",
"the",
"list",
"of",
"slices",
"and",
"removes",
"those",
"already",
"loaded",
"."
] | f2b91c2622c3f29d004485b6426b23b86c331f96 | https://github.com/dlemmermann/CalendarFX/blob/f2b91c2622c3f29d004485b6426b23b86c331f96/CalendarFXGoogle/src/main/java/com/calendarfx/google/view/data/GoogleCalendarData.java#L62-L67 |
49,351 | dlemmermann/CalendarFX | CalendarFXRecurrence/src/main/java/com/google/ical/iter/RecurrenceIteratorFactory.java | RecurrenceIteratorFactory.createRecurrenceIterator | public static RecurrenceIterator createRecurrenceIterator(
String rdata, DateValue dtStart, TimeZone tzid, boolean strict)
throws ParseException {
return createRecurrenceIterable(rdata, dtStart, tzid, strict).iterator();
} | java | public static RecurrenceIterator createRecurrenceIterator(
String rdata, DateValue dtStart, TimeZone tzid, boolean strict)
throws ParseException {
return createRecurrenceIterable(rdata, dtStart, tzid, strict).iterator();
} | [
"public",
"static",
"RecurrenceIterator",
"createRecurrenceIterator",
"(",
"String",
"rdata",
",",
"DateValue",
"dtStart",
",",
"TimeZone",
"tzid",
",",
"boolean",
"strict",
")",
"throws",
"ParseException",
"{",
"return",
"createRecurrenceIterable",
"(",
"rdata",
",",... | given a block of RRULE, EXRULE, RDATE, and EXDATE content lines, parse
them into a single recurrence iterator.
@param rdata ical text.
@param dtStart the date of the first occurrence in timezone tzid, which is
used to fill in optional fields in the RRULE, such as the day of the
month for a monthly repetition when no th... | [
"given",
"a",
"block",
"of",
"RRULE",
"EXRULE",
"RDATE",
"and",
"EXDATE",
"content",
"lines",
"parse",
"them",
"into",
"a",
"single",
"recurrence",
"iterator",
"."
] | f2b91c2622c3f29d004485b6426b23b86c331f96 | https://github.com/dlemmermann/CalendarFX/blob/f2b91c2622c3f29d004485b6426b23b86c331f96/CalendarFXRecurrence/src/main/java/com/google/ical/iter/RecurrenceIteratorFactory.java#L91-L95 |
49,352 | dlemmermann/CalendarFX | CalendarFXRecurrence/src/main/java/com/google/ical/iter/RecurrenceIteratorFactory.java | RecurrenceIteratorFactory.createRecurrenceIterator | public static RecurrenceIterator createRecurrenceIterator(RDateList rdates) {
DateValue[] dates = rdates.getDatesUtc();
Arrays.sort(dates);
int k = 0;
for (int i = 1; i < dates.length; ++i) {
if (!dates[i].equals(dates[k])) {
dates[++k] = dates[i];
... | java | public static RecurrenceIterator createRecurrenceIterator(RDateList rdates) {
DateValue[] dates = rdates.getDatesUtc();
Arrays.sort(dates);
int k = 0;
for (int i = 1; i < dates.length; ++i) {
if (!dates[i].equals(dates[k])) {
dates[++k] = dates[i];
... | [
"public",
"static",
"RecurrenceIterator",
"createRecurrenceIterator",
"(",
"RDateList",
"rdates",
")",
"{",
"DateValue",
"[",
"]",
"dates",
"=",
"rdates",
".",
"getDatesUtc",
"(",
")",
";",
"Arrays",
".",
"sort",
"(",
"dates",
")",
";",
"int",
"k",
"=",
"0... | create a recurrence iterator from an rdate or exdate list. | [
"create",
"a",
"recurrence",
"iterator",
"from",
"an",
"rdate",
"or",
"exdate",
"list",
"."
] | f2b91c2622c3f29d004485b6426b23b86c331f96 | https://github.com/dlemmermann/CalendarFX/blob/f2b91c2622c3f29d004485b6426b23b86c331f96/CalendarFXRecurrence/src/main/java/com/google/ical/iter/RecurrenceIteratorFactory.java#L157-L172 |
49,353 | dlemmermann/CalendarFX | CalendarFXRecurrence/src/main/java/com/google/ical/iter/RecurrenceIteratorFactory.java | RecurrenceIteratorFactory.join | public static RecurrenceIterator join(
RecurrenceIterator a, RecurrenceIterator... b) {
List<RecurrenceIterator> incl = new ArrayList<RecurrenceIterator>();
incl.add(a);
incl.addAll(Arrays.asList(b));
return new CompoundIteratorImpl(
incl, Collections.<Recurre... | java | public static RecurrenceIterator join(
RecurrenceIterator a, RecurrenceIterator... b) {
List<RecurrenceIterator> incl = new ArrayList<RecurrenceIterator>();
incl.add(a);
incl.addAll(Arrays.asList(b));
return new CompoundIteratorImpl(
incl, Collections.<Recurre... | [
"public",
"static",
"RecurrenceIterator",
"join",
"(",
"RecurrenceIterator",
"a",
",",
"RecurrenceIterator",
"...",
"b",
")",
"{",
"List",
"<",
"RecurrenceIterator",
">",
"incl",
"=",
"new",
"ArrayList",
"<",
"RecurrenceIterator",
">",
"(",
")",
";",
"incl",
"... | a recurrence iterator that returns the union of the given recurrence
iterators. | [
"a",
"recurrence",
"iterator",
"that",
"returns",
"the",
"union",
"of",
"the",
"given",
"recurrence",
"iterators",
"."
] | f2b91c2622c3f29d004485b6426b23b86c331f96 | https://github.com/dlemmermann/CalendarFX/blob/f2b91c2622c3f29d004485b6426b23b86c331f96/CalendarFXRecurrence/src/main/java/com/google/ical/iter/RecurrenceIteratorFactory.java#L501-L508 |
49,354 | dlemmermann/CalendarFX | CalendarFXRecurrence/src/main/java/com/google/ical/iter/RecurrenceIteratorFactory.java | RecurrenceIteratorFactory.filterBySetPos | private static int[] filterBySetPos(int[] members, int[] bySetPos) {
members = Util.uniquify(members);
IntSet iset = new IntSet();
for (int pos : bySetPos) {
if (pos == 0) {
continue;
}
if (pos < 0) {
pos += members.length;
... | java | private static int[] filterBySetPos(int[] members, int[] bySetPos) {
members = Util.uniquify(members);
IntSet iset = new IntSet();
for (int pos : bySetPos) {
if (pos == 0) {
continue;
}
if (pos < 0) {
pos += members.length;
... | [
"private",
"static",
"int",
"[",
"]",
"filterBySetPos",
"(",
"int",
"[",
"]",
"members",
",",
"int",
"[",
"]",
"bySetPos",
")",
"{",
"members",
"=",
"Util",
".",
"uniquify",
"(",
"members",
")",
";",
"IntSet",
"iset",
"=",
"new",
"IntSet",
"(",
")",
... | Given an array like BYMONTH=2,3,4,5 and a set pos like BYSETPOS=1,-1
reduce both clauses to a single one, BYMONTH=2,5 in the preceding. | [
"Given",
"an",
"array",
"like",
"BYMONTH",
"=",
"2",
"3",
"4",
"5",
"and",
"a",
"set",
"pos",
"like",
"BYSETPOS",
"=",
"1",
"-",
"1",
"reduce",
"both",
"clauses",
"to",
"a",
"single",
"one",
"BYMONTH",
"=",
"2",
"5",
"in",
"the",
"preceding",
"."
] | f2b91c2622c3f29d004485b6426b23b86c331f96 | https://github.com/dlemmermann/CalendarFX/blob/f2b91c2622c3f29d004485b6426b23b86c331f96/CalendarFXRecurrence/src/main/java/com/google/ical/iter/RecurrenceIteratorFactory.java#L585-L602 |
49,355 | dlemmermann/CalendarFX | CalendarFXRecurrence/src/main/java/com/google/ical/compat/javautil/DateIteratorFactory.java | DateIteratorFactory.createDateIterator | public static DateIterator createDateIterator(
String rdata, Date start, TimeZone tzid, boolean strict)
throws ParseException {
return new RecurrenceIteratorWrapper(
RecurrenceIteratorFactory.createRecurrenceIterator(
rdata, dateToDateValue(start, ... | java | public static DateIterator createDateIterator(
String rdata, Date start, TimeZone tzid, boolean strict)
throws ParseException {
return new RecurrenceIteratorWrapper(
RecurrenceIteratorFactory.createRecurrenceIterator(
rdata, dateToDateValue(start, ... | [
"public",
"static",
"DateIterator",
"createDateIterator",
"(",
"String",
"rdata",
",",
"Date",
"start",
",",
"TimeZone",
"tzid",
",",
"boolean",
"strict",
")",
"throws",
"ParseException",
"{",
"return",
"new",
"RecurrenceIteratorWrapper",
"(",
"RecurrenceIteratorFacto... | given a block of RRULE, EXRULE, RDATE, and EXDATE content lines, parse
them into a single date iterator.
@param rdata RRULE, EXRULE, RDATE, and EXDATE lines.
@param start the first occurrence of the series.
@param tzid the local timezone -- used to interpret start and any dates in
RDATE and EXDATE lines that don't have... | [
"given",
"a",
"block",
"of",
"RRULE",
"EXRULE",
"RDATE",
"and",
"EXDATE",
"content",
"lines",
"parse",
"them",
"into",
"a",
"single",
"date",
"iterator",
"."
] | f2b91c2622c3f29d004485b6426b23b86c331f96 | https://github.com/dlemmermann/CalendarFX/blob/f2b91c2622c3f29d004485b6426b23b86c331f96/CalendarFXRecurrence/src/main/java/com/google/ical/compat/javautil/DateIteratorFactory.java#L58-L65 |
49,356 | dlemmermann/CalendarFX | CalendarFXRecurrence/src/main/java/com/google/ical/compat/javautil/DateIteratorFactory.java | DateIteratorFactory.createDateIterable | public static DateIterable createDateIterable(
String rdata, Date start, TimeZone tzid, boolean strict)
throws ParseException {
return new RecurrenceIterableWrapper(
RecurrenceIteratorFactory.createRecurrenceIterable(
rdata, dateToDateValue(start, ... | java | public static DateIterable createDateIterable(
String rdata, Date start, TimeZone tzid, boolean strict)
throws ParseException {
return new RecurrenceIterableWrapper(
RecurrenceIteratorFactory.createRecurrenceIterable(
rdata, dateToDateValue(start, ... | [
"public",
"static",
"DateIterable",
"createDateIterable",
"(",
"String",
"rdata",
",",
"Date",
"start",
",",
"TimeZone",
"tzid",
",",
"boolean",
"strict",
")",
"throws",
"ParseException",
"{",
"return",
"new",
"RecurrenceIterableWrapper",
"(",
"RecurrenceIteratorFacto... | given a block of RRULE, EXRULE, RDATE, and EXDATE content lines, parse
them into a single date iterable.
@param rdata RRULE, EXRULE, RDATE, and EXDATE lines.
@param start the first occurrence of the series.
@param tzid the local timezone -- used to interpret start and any dates in
RDATE and EXDATE lines that don't have... | [
"given",
"a",
"block",
"of",
"RRULE",
"EXRULE",
"RDATE",
"and",
"EXDATE",
"content",
"lines",
"parse",
"them",
"into",
"a",
"single",
"date",
"iterable",
"."
] | f2b91c2622c3f29d004485b6426b23b86c331f96 | https://github.com/dlemmermann/CalendarFX/blob/f2b91c2622c3f29d004485b6426b23b86c331f96/CalendarFXRecurrence/src/main/java/com/google/ical/compat/javautil/DateIteratorFactory.java#L77-L84 |
49,357 | dlemmermann/CalendarFX | CalendarFXGoogle/src/main/java/com/calendarfx/google/model/GoogleCalendar.java | GoogleCalendar.createEntry | public final GoogleEntry createEntry(ZonedDateTime start, boolean fullDay) {
GoogleEntry entry = new GoogleEntry();
entry.setTitle("New Entry " + generateEntryConsecutive());
entry.setInterval(new Interval(start.toLocalDate(), start.toLocalTime(), start.toLocalDate(), start.toLocalTime().plusHou... | java | public final GoogleEntry createEntry(ZonedDateTime start, boolean fullDay) {
GoogleEntry entry = new GoogleEntry();
entry.setTitle("New Entry " + generateEntryConsecutive());
entry.setInterval(new Interval(start.toLocalDate(), start.toLocalTime(), start.toLocalDate(), start.toLocalTime().plusHou... | [
"public",
"final",
"GoogleEntry",
"createEntry",
"(",
"ZonedDateTime",
"start",
",",
"boolean",
"fullDay",
")",
"{",
"GoogleEntry",
"entry",
"=",
"new",
"GoogleEntry",
"(",
")",
";",
"entry",
".",
"setTitle",
"(",
"\"New Entry \"",
"+",
"generateEntryConsecutive",... | Creates a new google entry by using the given parameters, this assigns a
default name by using a consecutive number. The entry is of course
associated to this calendar, but it is not sent to google for storing.
@param start
The start date/time of the new entry.
@param fullDay
A flag indicating if the new entry is goin... | [
"Creates",
"a",
"new",
"google",
"entry",
"by",
"using",
"the",
"given",
"parameters",
"this",
"assigns",
"a",
"default",
"name",
"by",
"using",
"a",
"consecutive",
"number",
".",
"The",
"entry",
"is",
"of",
"course",
"associated",
"to",
"this",
"calendar",
... | f2b91c2622c3f29d004485b6426b23b86c331f96 | https://github.com/dlemmermann/CalendarFX/blob/f2b91c2622c3f29d004485b6426b23b86c331f96/CalendarFXGoogle/src/main/java/com/calendarfx/google/model/GoogleCalendar.java#L143-L151 |
49,358 | dlemmermann/CalendarFX | CalendarFXRecurrence/src/main/java/com/google/ical/iter/Conditions.java | Conditions.countCondition | static Predicate<DateValue> countCondition(final int count) {
return new Predicate<DateValue>() {
int count_ = count;
public boolean apply(DateValue value) {
return --count_ >= 0;
}
@Override
public String toString() {
... | java | static Predicate<DateValue> countCondition(final int count) {
return new Predicate<DateValue>() {
int count_ = count;
public boolean apply(DateValue value) {
return --count_ >= 0;
}
@Override
public String toString() {
... | [
"static",
"Predicate",
"<",
"DateValue",
">",
"countCondition",
"(",
"final",
"int",
"count",
")",
"{",
"return",
"new",
"Predicate",
"<",
"DateValue",
">",
"(",
")",
"{",
"int",
"count_",
"=",
"count",
";",
"public",
"boolean",
"apply",
"(",
"DateValue",
... | constructs a condition that fails after passing count dates. | [
"constructs",
"a",
"condition",
"that",
"fails",
"after",
"passing",
"count",
"dates",
"."
] | f2b91c2622c3f29d004485b6426b23b86c331f96 | https://github.com/dlemmermann/CalendarFX/blob/f2b91c2622c3f29d004485b6426b23b86c331f96/CalendarFXRecurrence/src/main/java/com/google/ical/iter/Conditions.java#L34-L47 |
49,359 | dlemmermann/CalendarFX | CalendarFXRecurrence/src/main/java/com/google/ical/iter/Conditions.java | Conditions.untilCondition | static Predicate<DateValue> untilCondition(final DateValue until) {
return new Predicate<DateValue>() {
public boolean apply(DateValue date) {
return date.compareTo(until) <= 0;
}
@Override
public String toString() {
return "UntilC... | java | static Predicate<DateValue> untilCondition(final DateValue until) {
return new Predicate<DateValue>() {
public boolean apply(DateValue date) {
return date.compareTo(until) <= 0;
}
@Override
public String toString() {
return "UntilC... | [
"static",
"Predicate",
"<",
"DateValue",
">",
"untilCondition",
"(",
"final",
"DateValue",
"until",
")",
"{",
"return",
"new",
"Predicate",
"<",
"DateValue",
">",
"(",
")",
"{",
"public",
"boolean",
"apply",
"(",
"DateValue",
"date",
")",
"{",
"return",
"d... | constructs a condition that passes for every date on or before until.
@param until non null. | [
"constructs",
"a",
"condition",
"that",
"passes",
"for",
"every",
"date",
"on",
"or",
"before",
"until",
"."
] | f2b91c2622c3f29d004485b6426b23b86c331f96 | https://github.com/dlemmermann/CalendarFX/blob/f2b91c2622c3f29d004485b6426b23b86c331f96/CalendarFXRecurrence/src/main/java/com/google/ical/iter/Conditions.java#L53-L64 |
49,360 | dlemmermann/CalendarFX | CalendarFXRecurrence/src/main/java/com/google/ical/values/PeriodValueImpl.java | PeriodValueImpl.createFromDuration | public static PeriodValue createFromDuration(DateValue start, DateValue dur) {
DateValue end = TimeUtils.add(start, dur);
if (end instanceof TimeValue && !(start instanceof TimeValue)) {
start = TimeUtils.dayStart(start);
}
return new PeriodValueImpl(start, end);
} | java | public static PeriodValue createFromDuration(DateValue start, DateValue dur) {
DateValue end = TimeUtils.add(start, dur);
if (end instanceof TimeValue && !(start instanceof TimeValue)) {
start = TimeUtils.dayStart(start);
}
return new PeriodValueImpl(start, end);
} | [
"public",
"static",
"PeriodValue",
"createFromDuration",
"(",
"DateValue",
"start",
",",
"DateValue",
"dur",
")",
"{",
"DateValue",
"end",
"=",
"TimeUtils",
".",
"add",
"(",
"start",
",",
"dur",
")",
";",
"if",
"(",
"end",
"instanceof",
"TimeValue",
"&&",
... | returns a period with the given start date and duration.
@param start non null.
@param dur a positive duration represented as a DateValue. | [
"returns",
"a",
"period",
"with",
"the",
"given",
"start",
"date",
"and",
"duration",
"."
] | f2b91c2622c3f29d004485b6426b23b86c331f96 | https://github.com/dlemmermann/CalendarFX/blob/f2b91c2622c3f29d004485b6426b23b86c331f96/CalendarFXRecurrence/src/main/java/com/google/ical/values/PeriodValueImpl.java#L49-L55 |
49,361 | dlemmermann/CalendarFX | CalendarFXRecurrence/src/main/java/com/google/ical/values/PeriodValueImpl.java | PeriodValueImpl.intersects | public boolean intersects(PeriodValue pv) {
DateValue sa = this.start,
ea = this.end,
sb = pv.start(),
eb = pv.end();
return sa.compareTo(eb) < 0 && sb.compareTo(ea) < 0;
} | java | public boolean intersects(PeriodValue pv) {
DateValue sa = this.start,
ea = this.end,
sb = pv.start(),
eb = pv.end();
return sa.compareTo(eb) < 0 && sb.compareTo(ea) < 0;
} | [
"public",
"boolean",
"intersects",
"(",
"PeriodValue",
"pv",
")",
"{",
"DateValue",
"sa",
"=",
"this",
".",
"start",
",",
"ea",
"=",
"this",
".",
"end",
",",
"sb",
"=",
"pv",
".",
"start",
"(",
")",
",",
"eb",
"=",
"pv",
".",
"end",
"(",
")",
"... | true iff this period overlaps the given period. | [
"true",
"iff",
"this",
"period",
"overlaps",
"the",
"given",
"period",
"."
] | f2b91c2622c3f29d004485b6426b23b86c331f96 | https://github.com/dlemmermann/CalendarFX/blob/f2b91c2622c3f29d004485b6426b23b86c331f96/CalendarFXRecurrence/src/main/java/com/google/ical/values/PeriodValueImpl.java#L80-L87 |
49,362 | dlemmermann/CalendarFX | CalendarFXView/src/main/java/com/calendarfx/util/Util.java | Util.adjustToFirstDayOfWeek | public static LocalDate adjustToFirstDayOfWeek(LocalDate date, DayOfWeek firstDayOfWeek) {
LocalDate newDate = date.with(DAY_OF_WEEK, firstDayOfWeek.getValue());
if (newDate.isAfter(date)) {
newDate = newDate.minusWeeks(1);
}
return newDate;
} | java | public static LocalDate adjustToFirstDayOfWeek(LocalDate date, DayOfWeek firstDayOfWeek) {
LocalDate newDate = date.with(DAY_OF_WEEK, firstDayOfWeek.getValue());
if (newDate.isAfter(date)) {
newDate = newDate.minusWeeks(1);
}
return newDate;
} | [
"public",
"static",
"LocalDate",
"adjustToFirstDayOfWeek",
"(",
"LocalDate",
"date",
",",
"DayOfWeek",
"firstDayOfWeek",
")",
"{",
"LocalDate",
"newDate",
"=",
"date",
".",
"with",
"(",
"DAY_OF_WEEK",
",",
"firstDayOfWeek",
".",
"getValue",
"(",
")",
")",
";",
... | Adjusts the given date to a new date that marks the beginning of the week where the
given date is located. If "Monday" is the first day of the week and the given date
is a "Wednesday" then this method will return a date that is two days earlier than the
given date.
@param date the date to adjust
@param first... | [
"Adjusts",
"the",
"given",
"date",
"to",
"a",
"new",
"date",
"that",
"marks",
"the",
"beginning",
"of",
"the",
"week",
"where",
"the",
"given",
"date",
"is",
"located",
".",
"If",
"Monday",
"is",
"the",
"first",
"day",
"of",
"the",
"week",
"and",
"the"... | f2b91c2622c3f29d004485b6426b23b86c331f96 | https://github.com/dlemmermann/CalendarFX/blob/f2b91c2622c3f29d004485b6426b23b86c331f96/CalendarFXView/src/main/java/com/calendarfx/util/Util.java#L272-L279 |
49,363 | dlemmermann/CalendarFX | CalendarFXView/src/main/java/com/calendarfx/util/Util.java | Util.adjustToLastDayOfWeek | public static LocalDate adjustToLastDayOfWeek(LocalDate date, DayOfWeek firstDayOfWeek) {
LocalDate startOfWeek = adjustToFirstDayOfWeek(date, firstDayOfWeek);
return startOfWeek.plusDays(6);
} | java | public static LocalDate adjustToLastDayOfWeek(LocalDate date, DayOfWeek firstDayOfWeek) {
LocalDate startOfWeek = adjustToFirstDayOfWeek(date, firstDayOfWeek);
return startOfWeek.plusDays(6);
} | [
"public",
"static",
"LocalDate",
"adjustToLastDayOfWeek",
"(",
"LocalDate",
"date",
",",
"DayOfWeek",
"firstDayOfWeek",
")",
"{",
"LocalDate",
"startOfWeek",
"=",
"adjustToFirstDayOfWeek",
"(",
"date",
",",
"firstDayOfWeek",
")",
";",
"return",
"startOfWeek",
".",
"... | Adjusts the given date to a new date that marks the end of the week where the
given date is located. If "Monday" is the first day of the week and the given date
is a "Wednesday" then this method will return a date that is four days later than the
given date. This method calculates the first day of the week and then add... | [
"Adjusts",
"the",
"given",
"date",
"to",
"a",
"new",
"date",
"that",
"marks",
"the",
"end",
"of",
"the",
"week",
"where",
"the",
"given",
"date",
"is",
"located",
".",
"If",
"Monday",
"is",
"the",
"first",
"day",
"of",
"the",
"week",
"and",
"the",
"g... | f2b91c2622c3f29d004485b6426b23b86c331f96 | https://github.com/dlemmermann/CalendarFX/blob/f2b91c2622c3f29d004485b6426b23b86c331f96/CalendarFXView/src/main/java/com/calendarfx/util/Util.java#L294-L297 |
49,364 | dlemmermann/CalendarFX | CalendarFXView/src/main/java/com/calendarfx/view/VirtualGrid.java | VirtualGrid.adjustTime | public Instant adjustTime(Instant instant, ZoneId zoneId, boolean roundUp,
DayOfWeek firstDayOfWeek) {
requireNonNull(instant);
requireNonNull(zoneId);
requireNonNull(firstDayOfWeek);
ZonedDateTime zonedDateTime = ZonedDateTime.ofInstant(instant, zoneId);
... | java | public Instant adjustTime(Instant instant, ZoneId zoneId, boolean roundUp,
DayOfWeek firstDayOfWeek) {
requireNonNull(instant);
requireNonNull(zoneId);
requireNonNull(firstDayOfWeek);
ZonedDateTime zonedDateTime = ZonedDateTime.ofInstant(instant, zoneId);
... | [
"public",
"Instant",
"adjustTime",
"(",
"Instant",
"instant",
",",
"ZoneId",
"zoneId",
",",
"boolean",
"roundUp",
",",
"DayOfWeek",
"firstDayOfWeek",
")",
"{",
"requireNonNull",
"(",
"instant",
")",
";",
"requireNonNull",
"(",
"zoneId",
")",
";",
"requireNonNull... | Adjusts the given instant either rounding it up or down.
@param instant
the instant to adjust
@param zoneId
the time zone
@param roundUp
the rounding direction
@param firstDayOfWeek
the first day of the week (needed for rounding weeks)
@return the adjusted instant | [
"Adjusts",
"the",
"given",
"instant",
"either",
"rounding",
"it",
"up",
"or",
"down",
"."
] | f2b91c2622c3f29d004485b6426b23b86c331f96 | https://github.com/dlemmermann/CalendarFX/blob/f2b91c2622c3f29d004485b6426b23b86c331f96/CalendarFXView/src/main/java/com/calendarfx/view/VirtualGrid.java#L165-L181 |
49,365 | dlemmermann/CalendarFX | CalendarFXView/src/main/java/com/calendarfx/view/EntryViewBase.java | EntryViewBase.dateControlProperty | public final ReadOnlyObjectProperty<T> dateControlProperty() {
if (dateControl == null) {
dateControl = new ReadOnlyObjectWrapper<>(this, "dateControl", _dateControl); //$NON-NLS-1$
}
return dateControl.getReadOnlyProperty();
} | java | public final ReadOnlyObjectProperty<T> dateControlProperty() {
if (dateControl == null) {
dateControl = new ReadOnlyObjectWrapper<>(this, "dateControl", _dateControl); //$NON-NLS-1$
}
return dateControl.getReadOnlyProperty();
} | [
"public",
"final",
"ReadOnlyObjectProperty",
"<",
"T",
">",
"dateControlProperty",
"(",
")",
"{",
"if",
"(",
"dateControl",
"==",
"null",
")",
"{",
"dateControl",
"=",
"new",
"ReadOnlyObjectWrapper",
"<>",
"(",
"this",
",",
"\"dateControl\"",
",",
"_dateControl"... | The date control where the entry view is shown.
@return the date control | [
"The",
"date",
"control",
"where",
"the",
"entry",
"view",
"is",
"shown",
"."
] | f2b91c2622c3f29d004485b6426b23b86c331f96 | https://github.com/dlemmermann/CalendarFX/blob/f2b91c2622c3f29d004485b6426b23b86c331f96/CalendarFXView/src/main/java/com/calendarfx/view/EntryViewBase.java#L498-L504 |
49,366 | dlemmermann/CalendarFX | CalendarFXView/src/main/java/com/calendarfx/view/EntryViewBase.java | EntryViewBase.isReadOnly | public final boolean isReadOnly() {
Entry<?> entry = getEntry();
Calendar calendar = entry.getCalendar();
if (calendar != null) {
return calendar.isReadOnly();
}
return false;
} | java | public final boolean isReadOnly() {
Entry<?> entry = getEntry();
Calendar calendar = entry.getCalendar();
if (calendar != null) {
return calendar.isReadOnly();
}
return false;
} | [
"public",
"final",
"boolean",
"isReadOnly",
"(",
")",
"{",
"Entry",
"<",
"?",
">",
"entry",
"=",
"getEntry",
"(",
")",
";",
"Calendar",
"calendar",
"=",
"entry",
".",
"getCalendar",
"(",
")",
";",
"if",
"(",
"calendar",
"!=",
"null",
")",
"{",
"retur... | Convenience method to determine whether the entry belongs to a calendar
that is read-only.
@return true if the entry can not be edited by the user | [
"Convenience",
"method",
"to",
"determine",
"whether",
"the",
"entry",
"belongs",
"to",
"a",
"calendar",
"that",
"is",
"read",
"-",
"only",
"."
] | f2b91c2622c3f29d004485b6426b23b86c331f96 | https://github.com/dlemmermann/CalendarFX/blob/f2b91c2622c3f29d004485b6426b23b86c331f96/CalendarFXView/src/main/java/com/calendarfx/view/EntryViewBase.java#L851-L859 |
49,367 | dlemmermann/CalendarFX | CalendarFXRecurrence/src/main/java/com/google/ical/values/IcalParseUtil.java | IcalParseUtil.parseDateValue | public static DateValue parseDateValue(String s, TimeZone tzid)
throws ParseException {
Matcher m = DATE_VALUE.matcher(s);
if (!m.matches()) {
throw new ParseException(s, 0);
}
int year = Integer.parseInt(m.group(1)),
month = Integer.parseInt(m.gro... | java | public static DateValue parseDateValue(String s, TimeZone tzid)
throws ParseException {
Matcher m = DATE_VALUE.matcher(s);
if (!m.matches()) {
throw new ParseException(s, 0);
}
int year = Integer.parseInt(m.group(1)),
month = Integer.parseInt(m.gro... | [
"public",
"static",
"DateValue",
"parseDateValue",
"(",
"String",
"s",
",",
"TimeZone",
"tzid",
")",
"throws",
"ParseException",
"{",
"Matcher",
"m",
"=",
"DATE_VALUE",
".",
"matcher",
"(",
"s",
")",
";",
"if",
"(",
"!",
"m",
".",
"matches",
"(",
")",
... | parses a date of the form yyyymmdd or yyyymmdd'T'hhMMss converting from
the given timezone to UTC. | [
"parses",
"a",
"date",
"of",
"the",
"form",
"yyyymmdd",
"or",
"yyyymmdd",
"T",
"hhMMss",
"converting",
"from",
"the",
"given",
"timezone",
"to",
"UTC",
"."
] | f2b91c2622c3f29d004485b6426b23b86c331f96 | https://github.com/dlemmermann/CalendarFX/blob/f2b91c2622c3f29d004485b6426b23b86c331f96/CalendarFXRecurrence/src/main/java/com/google/ical/values/IcalParseUtil.java#L51-L75 |
49,368 | dlemmermann/CalendarFX | CalendarFXGoogle/src/main/java/com/calendarfx/google/service/GoogleCalendarService.java | GoogleCalendarService.insertCalendar | public void insertCalendar(GoogleCalendar calendar) throws IOException {
com.google.api.services.calendar.model.Calendar cal;
cal = converter.convert(calendar, com.google.api.services.calendar.model.Calendar.class);
cal = dao.calendars().insert(cal).execute();
calendar.setId(cal.getId())... | java | public void insertCalendar(GoogleCalendar calendar) throws IOException {
com.google.api.services.calendar.model.Calendar cal;
cal = converter.convert(calendar, com.google.api.services.calendar.model.Calendar.class);
cal = dao.calendars().insert(cal).execute();
calendar.setId(cal.getId())... | [
"public",
"void",
"insertCalendar",
"(",
"GoogleCalendar",
"calendar",
")",
"throws",
"IOException",
"{",
"com",
".",
"google",
".",
"api",
".",
"services",
".",
"calendar",
".",
"model",
".",
"Calendar",
"cal",
";",
"cal",
"=",
"converter",
".",
"convert",
... | Inserts a calendar into the google calendar.
@param calendar The calendar to be inserted.
@throws IOException For unexpected errors. | [
"Inserts",
"a",
"calendar",
"into",
"the",
"google",
"calendar",
"."
] | f2b91c2622c3f29d004485b6426b23b86c331f96 | https://github.com/dlemmermann/CalendarFX/blob/f2b91c2622c3f29d004485b6426b23b86c331f96/CalendarFXGoogle/src/main/java/com/calendarfx/google/service/GoogleCalendarService.java#L59-L64 |
49,369 | dlemmermann/CalendarFX | CalendarFXGoogle/src/main/java/com/calendarfx/google/service/GoogleCalendarService.java | GoogleCalendarService.updateCalendar | public void updateCalendar(GoogleCalendar calendar) throws IOException {
CalendarListEntry calendarListEntry = converter.convert(calendar, CalendarListEntry.class);
dao.calendarList().update(calendarListEntry.getId(), calendarListEntry).execute();
} | java | public void updateCalendar(GoogleCalendar calendar) throws IOException {
CalendarListEntry calendarListEntry = converter.convert(calendar, CalendarListEntry.class);
dao.calendarList().update(calendarListEntry.getId(), calendarListEntry).execute();
} | [
"public",
"void",
"updateCalendar",
"(",
"GoogleCalendar",
"calendar",
")",
"throws",
"IOException",
"{",
"CalendarListEntry",
"calendarListEntry",
"=",
"converter",
".",
"convert",
"(",
"calendar",
",",
"CalendarListEntry",
".",
"class",
")",
";",
"dao",
".",
"ca... | Saves the updates done on the calendar into google calendar api.
@param calendar The calendar to be updated.
@throws IOException For unexpected errors. | [
"Saves",
"the",
"updates",
"done",
"on",
"the",
"calendar",
"into",
"google",
"calendar",
"api",
"."
] | f2b91c2622c3f29d004485b6426b23b86c331f96 | https://github.com/dlemmermann/CalendarFX/blob/f2b91c2622c3f29d004485b6426b23b86c331f96/CalendarFXGoogle/src/main/java/com/calendarfx/google/service/GoogleCalendarService.java#L72-L75 |
49,370 | dlemmermann/CalendarFX | CalendarFXGoogle/src/main/java/com/calendarfx/google/service/GoogleCalendarService.java | GoogleCalendarService.deleteCalendar | public void deleteCalendar(GoogleCalendar calendar) throws IOException {
dao.calendars().delete(calendar.getId()).execute();
} | java | public void deleteCalendar(GoogleCalendar calendar) throws IOException {
dao.calendars().delete(calendar.getId()).execute();
} | [
"public",
"void",
"deleteCalendar",
"(",
"GoogleCalendar",
"calendar",
")",
"throws",
"IOException",
"{",
"dao",
".",
"calendars",
"(",
")",
".",
"delete",
"(",
"calendar",
".",
"getId",
"(",
")",
")",
".",
"execute",
"(",
")",
";",
"}"
] | Performs an immediate delete request on the google calendar api.
@param calendar The calendar to be removed.
@throws IOException For unexpected errors | [
"Performs",
"an",
"immediate",
"delete",
"request",
"on",
"the",
"google",
"calendar",
"api",
"."
] | f2b91c2622c3f29d004485b6426b23b86c331f96 | https://github.com/dlemmermann/CalendarFX/blob/f2b91c2622c3f29d004485b6426b23b86c331f96/CalendarFXGoogle/src/main/java/com/calendarfx/google/service/GoogleCalendarService.java#L83-L85 |
49,371 | dlemmermann/CalendarFX | CalendarFXGoogle/src/main/java/com/calendarfx/google/service/GoogleCalendarService.java | GoogleCalendarService.insertEntry | public GoogleEntry insertEntry(GoogleEntry entry, GoogleCalendar calendar) throws IOException {
Event event = converter.convert(entry, Event.class);
event = dao.events().insert(calendar.getId(), event).execute();
entry.setId(event.getId());
entry.setUserObject(event);
return entr... | java | public GoogleEntry insertEntry(GoogleEntry entry, GoogleCalendar calendar) throws IOException {
Event event = converter.convert(entry, Event.class);
event = dao.events().insert(calendar.getId(), event).execute();
entry.setId(event.getId());
entry.setUserObject(event);
return entr... | [
"public",
"GoogleEntry",
"insertEntry",
"(",
"GoogleEntry",
"entry",
",",
"GoogleCalendar",
"calendar",
")",
"throws",
"IOException",
"{",
"Event",
"event",
"=",
"converter",
".",
"convert",
"(",
"entry",
",",
"Event",
".",
"class",
")",
";",
"event",
"=",
"... | Performs an immediate insert operation on google server by sending the
information provided by the given google entry. The entry is associated
to this calendar.
@param entry The entry to be inserted in a backend google calendar.
@param calendar The calendar in which the entry will be inserted.
@return The same instanc... | [
"Performs",
"an",
"immediate",
"insert",
"operation",
"on",
"google",
"server",
"by",
"sending",
"the",
"information",
"provided",
"by",
"the",
"given",
"google",
"entry",
".",
"The",
"entry",
"is",
"associated",
"to",
"this",
"calendar",
"."
] | f2b91c2622c3f29d004485b6426b23b86c331f96 | https://github.com/dlemmermann/CalendarFX/blob/f2b91c2622c3f29d004485b6426b23b86c331f96/CalendarFXGoogle/src/main/java/com/calendarfx/google/service/GoogleCalendarService.java#L97-L103 |
49,372 | dlemmermann/CalendarFX | CalendarFXGoogle/src/main/java/com/calendarfx/google/service/GoogleCalendarService.java | GoogleCalendarService.updateEntry | public GoogleEntry updateEntry(GoogleEntry entry) throws IOException {
GoogleCalendar calendar = (GoogleCalendar) entry.getCalendar();
Event event = converter.convert(entry, Event.class);
dao.events().update(calendar.getId(), event.getId(), event).execute();
return entry;
} | java | public GoogleEntry updateEntry(GoogleEntry entry) throws IOException {
GoogleCalendar calendar = (GoogleCalendar) entry.getCalendar();
Event event = converter.convert(entry, Event.class);
dao.events().update(calendar.getId(), event.getId(), event).execute();
return entry;
} | [
"public",
"GoogleEntry",
"updateEntry",
"(",
"GoogleEntry",
"entry",
")",
"throws",
"IOException",
"{",
"GoogleCalendar",
"calendar",
"=",
"(",
"GoogleCalendar",
")",
"entry",
".",
"getCalendar",
"(",
")",
";",
"Event",
"event",
"=",
"converter",
".",
"convert",... | Performs an immediate update operation on google server by sending the
information stored by the given google entry.
@param entry The entry to be updated in a backend google calendar.
@return The same instance received.
@throws IOException For unexpected errors | [
"Performs",
"an",
"immediate",
"update",
"operation",
"on",
"google",
"server",
"by",
"sending",
"the",
"information",
"stored",
"by",
"the",
"given",
"google",
"entry",
"."
] | f2b91c2622c3f29d004485b6426b23b86c331f96 | https://github.com/dlemmermann/CalendarFX/blob/f2b91c2622c3f29d004485b6426b23b86c331f96/CalendarFXGoogle/src/main/java/com/calendarfx/google/service/GoogleCalendarService.java#L113-L118 |
49,373 | dlemmermann/CalendarFX | CalendarFXGoogle/src/main/java/com/calendarfx/google/service/GoogleCalendarService.java | GoogleCalendarService.deleteEntry | public void deleteEntry(GoogleEntry entry, GoogleCalendar calendar) throws IOException {
dao.events().delete(calendar.getId(), entry.getId()).execute();
} | java | public void deleteEntry(GoogleEntry entry, GoogleCalendar calendar) throws IOException {
dao.events().delete(calendar.getId(), entry.getId()).execute();
} | [
"public",
"void",
"deleteEntry",
"(",
"GoogleEntry",
"entry",
",",
"GoogleCalendar",
"calendar",
")",
"throws",
"IOException",
"{",
"dao",
".",
"events",
"(",
")",
".",
"delete",
"(",
"calendar",
".",
"getId",
"(",
")",
",",
"entry",
".",
"getId",
"(",
"... | Sends a delete request to the google server for the given entry.
@param entry The entry to be deleted from the backend google calendar.
@param calendar The calendar from the entry was deleted.
@throws IOException For unexpected errors. | [
"Sends",
"a",
"delete",
"request",
"to",
"the",
"google",
"server",
"for",
"the",
"given",
"entry",
"."
] | f2b91c2622c3f29d004485b6426b23b86c331f96 | https://github.com/dlemmermann/CalendarFX/blob/f2b91c2622c3f29d004485b6426b23b86c331f96/CalendarFXGoogle/src/main/java/com/calendarfx/google/service/GoogleCalendarService.java#L127-L129 |
49,374 | dlemmermann/CalendarFX | CalendarFXGoogle/src/main/java/com/calendarfx/google/service/GoogleCalendarService.java | GoogleCalendarService.moveEntry | public GoogleEntry moveEntry(GoogleEntry entry, GoogleCalendar from, GoogleCalendar to) throws IOException {
dao.events().move(from.getId(), entry.getId(), to.getId()).execute();
return entry;
} | java | public GoogleEntry moveEntry(GoogleEntry entry, GoogleCalendar from, GoogleCalendar to) throws IOException {
dao.events().move(from.getId(), entry.getId(), to.getId()).execute();
return entry;
} | [
"public",
"GoogleEntry",
"moveEntry",
"(",
"GoogleEntry",
"entry",
",",
"GoogleCalendar",
"from",
",",
"GoogleCalendar",
"to",
")",
"throws",
"IOException",
"{",
"dao",
".",
"events",
"(",
")",
".",
"move",
"(",
"from",
".",
"getId",
"(",
")",
",",
"entry"... | Moves an entry from one calendar to another.
@param entry The entry to be moved.
@param from The current calendar.
@param to The future calendar.
@return The entry updated.
@throws IOException For unexpected errors. | [
"Moves",
"an",
"entry",
"from",
"one",
"calendar",
"to",
"another",
"."
] | f2b91c2622c3f29d004485b6426b23b86c331f96 | https://github.com/dlemmermann/CalendarFX/blob/f2b91c2622c3f29d004485b6426b23b86c331f96/CalendarFXGoogle/src/main/java/com/calendarfx/google/service/GoogleCalendarService.java#L140-L143 |
49,375 | dlemmermann/CalendarFX | CalendarFXGoogle/src/main/java/com/calendarfx/google/service/GoogleCalendarService.java | GoogleCalendarService.getCalendars | public List<GoogleCalendar> getCalendars() throws IOException {
List<CalendarListEntry> calendarListEntries = dao.calendarList().list().execute().getItems();
List<GoogleCalendar> calendars = new ArrayList<>();
if (calendarListEntries != null && !calendarListEntries.isEmpty()) {
for ... | java | public List<GoogleCalendar> getCalendars() throws IOException {
List<CalendarListEntry> calendarListEntries = dao.calendarList().list().execute().getItems();
List<GoogleCalendar> calendars = new ArrayList<>();
if (calendarListEntries != null && !calendarListEntries.isEmpty()) {
for ... | [
"public",
"List",
"<",
"GoogleCalendar",
">",
"getCalendars",
"(",
")",
"throws",
"IOException",
"{",
"List",
"<",
"CalendarListEntry",
">",
"calendarListEntries",
"=",
"dao",
".",
"calendarList",
"(",
")",
".",
"list",
"(",
")",
".",
"execute",
"(",
")",
... | Gets the list of all calendars available in the account.
@return A non-null list of all calendars.
@throws IOException For unexpected errors. | [
"Gets",
"the",
"list",
"of",
"all",
"calendars",
"available",
"in",
"the",
"account",
"."
] | f2b91c2622c3f29d004485b6426b23b86c331f96 | https://github.com/dlemmermann/CalendarFX/blob/f2b91c2622c3f29d004485b6426b23b86c331f96/CalendarFXGoogle/src/main/java/com/calendarfx/google/service/GoogleCalendarService.java#L151-L165 |
49,376 | dlemmermann/CalendarFX | CalendarFXGoogle/src/main/java/com/calendarfx/google/service/GoogleCalendarService.java | GoogleCalendarService.getEntries | public List<GoogleEntry> getEntries(GoogleCalendar calendar, LocalDate startDate, LocalDate endDate, ZoneId zoneId) throws IOException {
if (!calendar.existsInGoogle()) {
return new ArrayList<>(0);
}
ZonedDateTime st = ZonedDateTime.of(startDate, LocalTime.MIN, zoneId);
Zone... | java | public List<GoogleEntry> getEntries(GoogleCalendar calendar, LocalDate startDate, LocalDate endDate, ZoneId zoneId) throws IOException {
if (!calendar.existsInGoogle()) {
return new ArrayList<>(0);
}
ZonedDateTime st = ZonedDateTime.of(startDate, LocalTime.MIN, zoneId);
Zone... | [
"public",
"List",
"<",
"GoogleEntry",
">",
"getEntries",
"(",
"GoogleCalendar",
"calendar",
",",
"LocalDate",
"startDate",
",",
"LocalDate",
"endDate",
",",
"ZoneId",
"zoneId",
")",
"throws",
"IOException",
"{",
"if",
"(",
"!",
"calendar",
".",
"existsInGoogle",... | Gets a list of entries belonging to the given calendar defined between the given range of time. Recurring events
are not expanded, always recurrence is handled manually within the framework.
@param calendar The calendar owner of the entries.
@param startDate The start date, not nullable.
@param endDate The end date, n... | [
"Gets",
"a",
"list",
"of",
"entries",
"belonging",
"to",
"the",
"given",
"calendar",
"defined",
"between",
"the",
"given",
"range",
"of",
"time",
".",
"Recurring",
"events",
"are",
"not",
"expanded",
"always",
"recurrence",
"is",
"handled",
"manually",
"within... | f2b91c2622c3f29d004485b6426b23b86c331f96 | https://github.com/dlemmermann/CalendarFX/blob/f2b91c2622c3f29d004485b6426b23b86c331f96/CalendarFXGoogle/src/main/java/com/calendarfx/google/service/GoogleCalendarService.java#L178-L197 |
49,377 | dlemmermann/CalendarFX | CalendarFXGoogle/src/main/java/com/calendarfx/google/service/GoogleCalendarService.java | GoogleCalendarService.getEntries | public List<GoogleEntry> getEntries(GoogleCalendar calendar, String searchText) throws IOException {
if (!calendar.existsInGoogle()) {
return new ArrayList<>(0);
}
String calendarId = URLDecoder.decode(calendar.getId(), "UTF-8");
List<Event> events = dao.events()
... | java | public List<GoogleEntry> getEntries(GoogleCalendar calendar, String searchText) throws IOException {
if (!calendar.existsInGoogle()) {
return new ArrayList<>(0);
}
String calendarId = URLDecoder.decode(calendar.getId(), "UTF-8");
List<Event> events = dao.events()
... | [
"public",
"List",
"<",
"GoogleEntry",
">",
"getEntries",
"(",
"GoogleCalendar",
"calendar",
",",
"String",
"searchText",
")",
"throws",
"IOException",
"{",
"if",
"(",
"!",
"calendar",
".",
"existsInGoogle",
"(",
")",
")",
"{",
"return",
"new",
"ArrayList",
"... | Gets a list of entries that matches the given text. Recurring events
are not expanded, always recurrence is handled manually within the framework.
@param calendar The calendar owner of the entries.
@param searchText The search text
@return A non-null list of entries.
@throws IOException For unexpected errors | [
"Gets",
"a",
"list",
"of",
"entries",
"that",
"matches",
"the",
"given",
"text",
".",
"Recurring",
"events",
"are",
"not",
"expanded",
"always",
"recurrence",
"is",
"handled",
"manually",
"within",
"the",
"framework",
"."
] | f2b91c2622c3f29d004485b6426b23b86c331f96 | https://github.com/dlemmermann/CalendarFX/blob/f2b91c2622c3f29d004485b6426b23b86c331f96/CalendarFXGoogle/src/main/java/com/calendarfx/google/service/GoogleCalendarService.java#L208-L224 |
49,378 | dlemmermann/CalendarFX | CalendarFXGoogle/src/main/java/com/calendarfx/google/model/GoogleAccount.java | GoogleAccount.createCalendar | public final GoogleCalendar createCalendar(String name, Calendar.Style style) {
GoogleCalendar calendar = new GoogleCalendar();
calendar.setName(name);
calendar.setStyle(style);
return calendar;
} | java | public final GoogleCalendar createCalendar(String name, Calendar.Style style) {
GoogleCalendar calendar = new GoogleCalendar();
calendar.setName(name);
calendar.setStyle(style);
return calendar;
} | [
"public",
"final",
"GoogleCalendar",
"createCalendar",
"(",
"String",
"name",
",",
"Calendar",
".",
"Style",
"style",
")",
"{",
"GoogleCalendar",
"calendar",
"=",
"new",
"GoogleCalendar",
"(",
")",
";",
"calendar",
".",
"setName",
"(",
"name",
")",
";",
"cal... | Creates one single calendar with the given name and style.
@param name The name of the calendar.
@param style The style of the calendar.
@return The new google calendar. | [
"Creates",
"one",
"single",
"calendar",
"with",
"the",
"given",
"name",
"and",
"style",
"."
] | f2b91c2622c3f29d004485b6426b23b86c331f96 | https://github.com/dlemmermann/CalendarFX/blob/f2b91c2622c3f29d004485b6426b23b86c331f96/CalendarFXGoogle/src/main/java/com/calendarfx/google/model/GoogleAccount.java#L51-L56 |
49,379 | dlemmermann/CalendarFX | CalendarFXGoogle/src/main/java/com/calendarfx/google/model/GoogleAccount.java | GoogleAccount.getPrimaryCalendar | public GoogleCalendar getPrimaryCalendar() {
return (GoogleCalendar) getCalendars().stream()
.filter(calendar -> ((GoogleCalendar) calendar).isPrimary())
.findFirst()
.orElse(null);
} | java | public GoogleCalendar getPrimaryCalendar() {
return (GoogleCalendar) getCalendars().stream()
.filter(calendar -> ((GoogleCalendar) calendar).isPrimary())
.findFirst()
.orElse(null);
} | [
"public",
"GoogleCalendar",
"getPrimaryCalendar",
"(",
")",
"{",
"return",
"(",
"GoogleCalendar",
")",
"getCalendars",
"(",
")",
".",
"stream",
"(",
")",
".",
"filter",
"(",
"calendar",
"->",
"(",
"(",
"GoogleCalendar",
")",
"calendar",
")",
".",
"isPrimary"... | Gets the calendar marked as primary calendar for the google account.
@return The primary calendar, {@code null} if not loaded. | [
"Gets",
"the",
"calendar",
"marked",
"as",
"primary",
"calendar",
"for",
"the",
"google",
"account",
"."
] | f2b91c2622c3f29d004485b6426b23b86c331f96 | https://github.com/dlemmermann/CalendarFX/blob/f2b91c2622c3f29d004485b6426b23b86c331f96/CalendarFXGoogle/src/main/java/com/calendarfx/google/model/GoogleAccount.java#L63-L68 |
49,380 | dlemmermann/CalendarFX | CalendarFXGoogle/src/main/java/com/calendarfx/google/model/GoogleAccount.java | GoogleAccount.getGoogleCalendars | public List<GoogleCalendar> getGoogleCalendars() {
List<GoogleCalendar> googleCalendars = new ArrayList<>();
for (Calendar calendar : getCalendars()) {
if (!(calendar instanceof GoogleCalendar)) {
continue;
}
googleCalendars.add((GoogleCalendar) calend... | java | public List<GoogleCalendar> getGoogleCalendars() {
List<GoogleCalendar> googleCalendars = new ArrayList<>();
for (Calendar calendar : getCalendars()) {
if (!(calendar instanceof GoogleCalendar)) {
continue;
}
googleCalendars.add((GoogleCalendar) calend... | [
"public",
"List",
"<",
"GoogleCalendar",
">",
"getGoogleCalendars",
"(",
")",
"{",
"List",
"<",
"GoogleCalendar",
">",
"googleCalendars",
"=",
"new",
"ArrayList",
"<>",
"(",
")",
";",
"for",
"(",
"Calendar",
"calendar",
":",
"getCalendars",
"(",
")",
")",
... | Gets all the google calendars hold by this source.
@return The list of google calendars, always a new list. | [
"Gets",
"all",
"the",
"google",
"calendars",
"hold",
"by",
"this",
"source",
"."
] | f2b91c2622c3f29d004485b6426b23b86c331f96 | https://github.com/dlemmermann/CalendarFX/blob/f2b91c2622c3f29d004485b6426b23b86c331f96/CalendarFXGoogle/src/main/java/com/calendarfx/google/model/GoogleAccount.java#L75-L84 |
49,381 | dlemmermann/CalendarFX | CalendarFXGoogle/src/main/java/com/calendarfx/google/model/GoogleAccount.java | GoogleAccount.removeCalendarListeners | @SafeVarargs
public final void removeCalendarListeners(ListChangeListener<Calendar>... listeners) {
if (listeners != null) {
for (ListChangeListener<Calendar> listener : listeners) {
getCalendars().removeListener(listener);
}
}
} | java | @SafeVarargs
public final void removeCalendarListeners(ListChangeListener<Calendar>... listeners) {
if (listeners != null) {
for (ListChangeListener<Calendar> listener : listeners) {
getCalendars().removeListener(listener);
}
}
} | [
"@",
"SafeVarargs",
"public",
"final",
"void",
"removeCalendarListeners",
"(",
"ListChangeListener",
"<",
"Calendar",
">",
"...",
"listeners",
")",
"{",
"if",
"(",
"listeners",
"!=",
"null",
")",
"{",
"for",
"(",
"ListChangeListener",
"<",
"Calendar",
">",
"li... | Removes the listener from the ones being notified.
@param listeners The listener | [
"Removes",
"the",
"listener",
"from",
"the",
"ones",
"being",
"notified",
"."
] | f2b91c2622c3f29d004485b6426b23b86c331f96 | https://github.com/dlemmermann/CalendarFX/blob/f2b91c2622c3f29d004485b6426b23b86c331f96/CalendarFXGoogle/src/main/java/com/calendarfx/google/model/GoogleAccount.java#L105-L112 |
49,382 | dlemmermann/CalendarFX | CalendarFXView/src/main/java/com/calendarfx/model/Calendar.java | Calendar.findEntries | public final Map<LocalDate, List<Entry<?>>> findEntries(LocalDate startDate, LocalDate endDate, ZoneId zoneId) {
fireEvents = false;
Map<LocalDate, List<Entry<?>>> result;
try {
result = doGetEntries(startDate, endDate, zoneId);
} finally {
fireEvents = true;
... | java | public final Map<LocalDate, List<Entry<?>>> findEntries(LocalDate startDate, LocalDate endDate, ZoneId zoneId) {
fireEvents = false;
Map<LocalDate, List<Entry<?>>> result;
try {
result = doGetEntries(startDate, endDate, zoneId);
} finally {
fireEvents = true;
... | [
"public",
"final",
"Map",
"<",
"LocalDate",
",",
"List",
"<",
"Entry",
"<",
"?",
">",
">",
">",
"findEntries",
"(",
"LocalDate",
"startDate",
",",
"LocalDate",
"endDate",
",",
"ZoneId",
"zoneId",
")",
"{",
"fireEvents",
"=",
"false",
";",
"Map",
"<",
"... | Queries the calendar for all entries within the time interval defined by
the start date and end date.
@param startDate the start of the time interval
@param endDate the end of the time interval
@param zoneId the time zone for which to find entries
@return a map filled with list of entries for given days | [
"Queries",
"the",
"calendar",
"for",
"all",
"entries",
"within",
"the",
"time",
"interval",
"defined",
"by",
"the",
"start",
"date",
"and",
"end",
"date",
"."
] | f2b91c2622c3f29d004485b6426b23b86c331f96 | https://github.com/dlemmermann/CalendarFX/blob/f2b91c2622c3f29d004485b6426b23b86c331f96/CalendarFXView/src/main/java/com/calendarfx/model/Calendar.java#L270-L282 |
49,383 | dlemmermann/CalendarFX | CalendarFXView/src/main/java/com/calendarfx/model/Calendar.java | Calendar.addEventHandler | public final void addEventHandler(EventHandler<CalendarEvent> l) {
if (l != null) {
if (MODEL.isLoggable(FINER)) {
MODEL.finer(getName() + ": adding event handler: " + l); //$NON-NLS-1$
}
eventHandlers.add(l);
}
} | java | public final void addEventHandler(EventHandler<CalendarEvent> l) {
if (l != null) {
if (MODEL.isLoggable(FINER)) {
MODEL.finer(getName() + ": adding event handler: " + l); //$NON-NLS-1$
}
eventHandlers.add(l);
}
} | [
"public",
"final",
"void",
"addEventHandler",
"(",
"EventHandler",
"<",
"CalendarEvent",
">",
"l",
")",
"{",
"if",
"(",
"l",
"!=",
"null",
")",
"{",
"if",
"(",
"MODEL",
".",
"isLoggable",
"(",
"FINER",
")",
")",
"{",
"MODEL",
".",
"finer",
"(",
"getN... | Adds an event handler for calendar events. Handlers will be called when
an entry gets added, removed, changes, etc.
@param l the event handler to add | [
"Adds",
"an",
"event",
"handler",
"for",
"calendar",
"events",
".",
"Handlers",
"will",
"be",
"called",
"when",
"an",
"entry",
"gets",
"added",
"removed",
"changes",
"etc",
"."
] | f2b91c2622c3f29d004485b6426b23b86c331f96 | https://github.com/dlemmermann/CalendarFX/blob/f2b91c2622c3f29d004485b6426b23b86c331f96/CalendarFXView/src/main/java/com/calendarfx/model/Calendar.java#L838-L845 |
49,384 | dlemmermann/CalendarFX | CalendarFXView/src/main/java/com/calendarfx/model/Calendar.java | Calendar.removeEventHandler | public final void removeEventHandler(EventHandler<CalendarEvent> l) {
if (l != null) {
if (MODEL.isLoggable(FINER)) {
MODEL.finer(getName() + ": removing event handler: " + l); //$NON-NLS-1$
}
eventHandlers.remove(l);
}
} | java | public final void removeEventHandler(EventHandler<CalendarEvent> l) {
if (l != null) {
if (MODEL.isLoggable(FINER)) {
MODEL.finer(getName() + ": removing event handler: " + l); //$NON-NLS-1$
}
eventHandlers.remove(l);
}
} | [
"public",
"final",
"void",
"removeEventHandler",
"(",
"EventHandler",
"<",
"CalendarEvent",
">",
"l",
")",
"{",
"if",
"(",
"l",
"!=",
"null",
")",
"{",
"if",
"(",
"MODEL",
".",
"isLoggable",
"(",
"FINER",
")",
")",
"{",
"MODEL",
".",
"finer",
"(",
"g... | Removes an event handler from the calendar.
@param l the event handler to remove | [
"Removes",
"an",
"event",
"handler",
"from",
"the",
"calendar",
"."
] | f2b91c2622c3f29d004485b6426b23b86c331f96 | https://github.com/dlemmermann/CalendarFX/blob/f2b91c2622c3f29d004485b6426b23b86c331f96/CalendarFXView/src/main/java/com/calendarfx/model/Calendar.java#L852-L859 |
49,385 | dlemmermann/CalendarFX | CalendarFXView/src/main/java/com/calendarfx/model/Calendar.java | Calendar.fireEvent | public final void fireEvent(CalendarEvent evt) {
if (fireEvents && !batchUpdates) {
if (MODEL.isLoggable(FINER)) {
MODEL.finer(getName() + ": fireing event: " + evt); //$NON-NLS-1$
}
requireNonNull(evt);
Event.fireEvent(this, evt);
}
} | java | public final void fireEvent(CalendarEvent evt) {
if (fireEvents && !batchUpdates) {
if (MODEL.isLoggable(FINER)) {
MODEL.finer(getName() + ": fireing event: " + evt); //$NON-NLS-1$
}
requireNonNull(evt);
Event.fireEvent(this, evt);
}
} | [
"public",
"final",
"void",
"fireEvent",
"(",
"CalendarEvent",
"evt",
")",
"{",
"if",
"(",
"fireEvents",
"&&",
"!",
"batchUpdates",
")",
"{",
"if",
"(",
"MODEL",
".",
"isLoggable",
"(",
"FINER",
")",
")",
"{",
"MODEL",
".",
"finer",
"(",
"getName",
"(",... | Fires the given calendar event to all event handlers currently registered
with this calendar.
@param evt the event to fire | [
"Fires",
"the",
"given",
"calendar",
"event",
"to",
"all",
"event",
"handlers",
"currently",
"registered",
"with",
"this",
"calendar",
"."
] | f2b91c2622c3f29d004485b6426b23b86c331f96 | https://github.com/dlemmermann/CalendarFX/blob/f2b91c2622c3f29d004485b6426b23b86c331f96/CalendarFXView/src/main/java/com/calendarfx/model/Calendar.java#L869-L878 |
49,386 | dlemmermann/CalendarFX | CalendarFXGoogle/src/main/java/com/calendarfx/google/view/data/Slice.java | Slice.split | public static List<Slice> split(LocalDate start, LocalDate end) {
Objects.requireNonNull(start);
Objects.requireNonNull(end);
Preconditions.checkArgument(!start.isAfter(end));
List<Slice> slices = Lists.newArrayList();
LocalDate startOfMonth = start.withDayOfMonth(1);
L... | java | public static List<Slice> split(LocalDate start, LocalDate end) {
Objects.requireNonNull(start);
Objects.requireNonNull(end);
Preconditions.checkArgument(!start.isAfter(end));
List<Slice> slices = Lists.newArrayList();
LocalDate startOfMonth = start.withDayOfMonth(1);
L... | [
"public",
"static",
"List",
"<",
"Slice",
">",
"split",
"(",
"LocalDate",
"start",
",",
"LocalDate",
"end",
")",
"{",
"Objects",
".",
"requireNonNull",
"(",
"start",
")",
";",
"Objects",
".",
"requireNonNull",
"(",
"end",
")",
";",
"Preconditions",
".",
... | Splits the given period into multiple slices of one month long.
@param start the start of the period.
@param end the end of the period.
@return The list of slices result of the splitting. | [
"Splits",
"the",
"given",
"period",
"into",
"multiple",
"slices",
"of",
"one",
"month",
"long",
"."
] | f2b91c2622c3f29d004485b6426b23b86c331f96 | https://github.com/dlemmermann/CalendarFX/blob/f2b91c2622c3f29d004485b6426b23b86c331f96/CalendarFXGoogle/src/main/java/com/calendarfx/google/view/data/Slice.java#L114-L131 |
49,387 | dlemmermann/CalendarFX | CalendarFXView/src/main/java/com/calendarfx/model/IntervalTree.java | IntervalTree.contains | public final boolean contains(E entry) {
TreeEntry<E> e = getEntry(entry);
return e != null;
} | java | public final boolean contains(E entry) {
TreeEntry<E> e = getEntry(entry);
return e != null;
} | [
"public",
"final",
"boolean",
"contains",
"(",
"E",
"entry",
")",
"{",
"TreeEntry",
"<",
"E",
">",
"e",
"=",
"getEntry",
"(",
"entry",
")",
";",
"return",
"e",
"!=",
"null",
";",
"}"
] | Method to determine if the interval tree contains the given entry.
@param entry
the entry to check
@return true if the entry is a member of this tree | [
"Method",
"to",
"determine",
"if",
"the",
"interval",
"tree",
"contains",
"the",
"given",
"entry",
"."
] | f2b91c2622c3f29d004485b6426b23b86c331f96 | https://github.com/dlemmermann/CalendarFX/blob/f2b91c2622c3f29d004485b6426b23b86c331f96/CalendarFXView/src/main/java/com/calendarfx/model/IntervalTree.java#L109-L112 |
49,388 | dlemmermann/CalendarFX | CalendarFXView/src/main/java/com/calendarfx/model/IntervalTree.java | IntervalTree.getEntry | private TreeEntry<E> getEntry(Entry<?> entry) {
TreeEntry<E> t = root;
while (t != null) {
int cmp = compareLongs(getLow(entry), t.low);
if (cmp == 0)
cmp = compareLongs(getHigh(entry), t.high);
if (cmp == 0)
cmp = entry.hashCode() - t.... | java | private TreeEntry<E> getEntry(Entry<?> entry) {
TreeEntry<E> t = root;
while (t != null) {
int cmp = compareLongs(getLow(entry), t.low);
if (cmp == 0)
cmp = compareLongs(getHigh(entry), t.high);
if (cmp == 0)
cmp = entry.hashCode() - t.... | [
"private",
"TreeEntry",
"<",
"E",
">",
"getEntry",
"(",
"Entry",
"<",
"?",
">",
"entry",
")",
"{",
"TreeEntry",
"<",
"E",
">",
"t",
"=",
"root",
";",
"while",
"(",
"t",
"!=",
"null",
")",
"{",
"int",
"cmp",
"=",
"compareLongs",
"(",
"getLow",
"("... | Method to find entry by period. Period start, period end and object key
are used to identify each entry.
@param entry the calendar entry
@return appropriate entry, or null if not found | [
"Method",
"to",
"find",
"entry",
"by",
"period",
".",
"Period",
"start",
"period",
"end",
"and",
"object",
"key",
"are",
"used",
"to",
"identify",
"each",
"entry",
"."
] | f2b91c2622c3f29d004485b6426b23b86c331f96 | https://github.com/dlemmermann/CalendarFX/blob/f2b91c2622c3f29d004485b6426b23b86c331f96/CalendarFXView/src/main/java/com/calendarfx/model/IntervalTree.java#L247-L266 |
49,389 | dlemmermann/CalendarFX | CalendarFXView/src/main/java/impl/com/calendarfx/view/DeveloperConsoleSkin.java | DeveloperConsoleSkin.setDateControl | private void setDateControl(DateControl control) {
requireNonNull(control);
control.addEventFilter(RequestEvent.REQUEST,
evt -> addEvent(evt, LogEntryType.REQUEST_EVENT));
control.addEventFilter(LoadEvent.LOAD,
evt -> addEvent(evt, LogEntryType.LOAD_EVENT));
... | java | private void setDateControl(DateControl control) {
requireNonNull(control);
control.addEventFilter(RequestEvent.REQUEST,
evt -> addEvent(evt, LogEntryType.REQUEST_EVENT));
control.addEventFilter(LoadEvent.LOAD,
evt -> addEvent(evt, LogEntryType.LOAD_EVENT));
... | [
"private",
"void",
"setDateControl",
"(",
"DateControl",
"control",
")",
"{",
"requireNonNull",
"(",
"control",
")",
";",
"control",
".",
"addEventFilter",
"(",
"RequestEvent",
".",
"REQUEST",
",",
"evt",
"->",
"addEvent",
"(",
"evt",
",",
"LogEntryType",
".",... | Sets the control that will be "monitored" by the developer console.
@param control
the monitored control | [
"Sets",
"the",
"control",
"that",
"will",
"be",
"monitored",
"by",
"the",
"developer",
"console",
"."
] | f2b91c2622c3f29d004485b6426b23b86c331f96 | https://github.com/dlemmermann/CalendarFX/blob/f2b91c2622c3f29d004485b6426b23b86c331f96/CalendarFXView/src/main/java/impl/com/calendarfx/view/DeveloperConsoleSkin.java#L225-L262 |
49,390 | dlemmermann/CalendarFX | CalendarFXView/src/main/java/com/calendarfx/view/print/PrintablePage.java | PrintablePage.setDayDateTimeFormatter | public void setDayDateTimeFormatter(DateTimeFormatter formatter) {
if (getFormatterMap().get(ViewType.DAY_VIEW) == null) {
getFormatterMap().put(ViewType.DAY_VIEW, formatter);
} else {
getFormatterMap().replace(ViewType.DAY_VIEW, formatter);
}
} | java | public void setDayDateTimeFormatter(DateTimeFormatter formatter) {
if (getFormatterMap().get(ViewType.DAY_VIEW) == null) {
getFormatterMap().put(ViewType.DAY_VIEW, formatter);
} else {
getFormatterMap().replace(ViewType.DAY_VIEW, formatter);
}
} | [
"public",
"void",
"setDayDateTimeFormatter",
"(",
"DateTimeFormatter",
"formatter",
")",
"{",
"if",
"(",
"getFormatterMap",
"(",
")",
".",
"get",
"(",
"ViewType",
".",
"DAY_VIEW",
")",
"==",
"null",
")",
"{",
"getFormatterMap",
"(",
")",
".",
"put",
"(",
"... | Sets the DateTimeFormatter on the Day Label located in the day page.
Notice that this is also affecting the page that is going to be printed.
@param formatter
the DateTimeFormatter | [
"Sets",
"the",
"DateTimeFormatter",
"on",
"the",
"Day",
"Label",
"located",
"in",
"the",
"day",
"page",
".",
"Notice",
"that",
"this",
"is",
"also",
"affecting",
"the",
"page",
"that",
"is",
"going",
"to",
"be",
"printed",
"."
] | f2b91c2622c3f29d004485b6426b23b86c331f96 | https://github.com/dlemmermann/CalendarFX/blob/f2b91c2622c3f29d004485b6426b23b86c331f96/CalendarFXView/src/main/java/com/calendarfx/view/print/PrintablePage.java#L242-L248 |
49,391 | dlemmermann/CalendarFX | CalendarFXView/src/main/java/com/calendarfx/view/print/PrintablePage.java | PrintablePage.setWeekDateTimeFormatter | public void setWeekDateTimeFormatter(DateTimeFormatter formatter) {
if (getFormatterMap().get(ViewType.WEEK_VIEW) == null) {
getFormatterMap().put(ViewType.WEEK_VIEW, formatter);
} else {
getFormatterMap().replace(ViewType.WEEK_VIEW, formatter);
}
} | java | public void setWeekDateTimeFormatter(DateTimeFormatter formatter) {
if (getFormatterMap().get(ViewType.WEEK_VIEW) == null) {
getFormatterMap().put(ViewType.WEEK_VIEW, formatter);
} else {
getFormatterMap().replace(ViewType.WEEK_VIEW, formatter);
}
} | [
"public",
"void",
"setWeekDateTimeFormatter",
"(",
"DateTimeFormatter",
"formatter",
")",
"{",
"if",
"(",
"getFormatterMap",
"(",
")",
".",
"get",
"(",
"ViewType",
".",
"WEEK_VIEW",
")",
"==",
"null",
")",
"{",
"getFormatterMap",
"(",
")",
".",
"put",
"(",
... | Sets the DateTimeFormatter on the Week Label located in the week page.
Notice that this is also affecting the page that is going to be printed.
@param formatter
the DateTimeFormatter | [
"Sets",
"the",
"DateTimeFormatter",
"on",
"the",
"Week",
"Label",
"located",
"in",
"the",
"week",
"page",
".",
"Notice",
"that",
"this",
"is",
"also",
"affecting",
"the",
"page",
"that",
"is",
"going",
"to",
"be",
"printed",
"."
] | f2b91c2622c3f29d004485b6426b23b86c331f96 | https://github.com/dlemmermann/CalendarFX/blob/f2b91c2622c3f29d004485b6426b23b86c331f96/CalendarFXView/src/main/java/com/calendarfx/view/print/PrintablePage.java#L257-L263 |
49,392 | dlemmermann/CalendarFX | CalendarFXView/src/main/java/com/calendarfx/view/print/PrintablePage.java | PrintablePage.setMonthDateTimeFormatter | public void setMonthDateTimeFormatter(DateTimeFormatter formatter) {
if (getFormatterMap().get(ViewType.MONTH_VIEW) == null) {
getFormatterMap().put(ViewType.MONTH_VIEW, formatter);
} else {
getFormatterMap().replace(ViewType.MONTH_VIEW, formatter);
}
} | java | public void setMonthDateTimeFormatter(DateTimeFormatter formatter) {
if (getFormatterMap().get(ViewType.MONTH_VIEW) == null) {
getFormatterMap().put(ViewType.MONTH_VIEW, formatter);
} else {
getFormatterMap().replace(ViewType.MONTH_VIEW, formatter);
}
} | [
"public",
"void",
"setMonthDateTimeFormatter",
"(",
"DateTimeFormatter",
"formatter",
")",
"{",
"if",
"(",
"getFormatterMap",
"(",
")",
".",
"get",
"(",
"ViewType",
".",
"MONTH_VIEW",
")",
"==",
"null",
")",
"{",
"getFormatterMap",
"(",
")",
".",
"put",
"(",... | Sets the DateTimeFormatter on the Month Label located in the month page.
Notice that this is also affecting the page that is going to be printed.
@param formatter
the DateTimeFormatter | [
"Sets",
"the",
"DateTimeFormatter",
"on",
"the",
"Month",
"Label",
"located",
"in",
"the",
"month",
"page",
".",
"Notice",
"that",
"this",
"is",
"also",
"affecting",
"the",
"page",
"that",
"is",
"going",
"to",
"be",
"printed",
"."
] | f2b91c2622c3f29d004485b6426b23b86c331f96 | https://github.com/dlemmermann/CalendarFX/blob/f2b91c2622c3f29d004485b6426b23b86c331f96/CalendarFXView/src/main/java/com/calendarfx/view/print/PrintablePage.java#L272-L278 |
49,393 | dlemmermann/CalendarFX | CalendarFXView/src/main/java/com/calendarfx/view/print/PrintablePage.java | PrintablePage.removeDataBindings | private void removeDataBindings() {
Bindings.unbindContent(detailedDayView.getCalendarSources(),
getCalendarSources());
Bindings.unbindContentBidirectional(
detailedDayView.getCalendarVisibilityMap(),
getCalendarVisibilityMap());
Bindings.unbindCon... | java | private void removeDataBindings() {
Bindings.unbindContent(detailedDayView.getCalendarSources(),
getCalendarSources());
Bindings.unbindContentBidirectional(
detailedDayView.getCalendarVisibilityMap(),
getCalendarVisibilityMap());
Bindings.unbindCon... | [
"private",
"void",
"removeDataBindings",
"(",
")",
"{",
"Bindings",
".",
"unbindContent",
"(",
"detailedDayView",
".",
"getCalendarSources",
"(",
")",
",",
"getCalendarSources",
"(",
")",
")",
";",
"Bindings",
".",
"unbindContentBidirectional",
"(",
"detailedDayView... | Removes all bindings related with the calendar sources and visibility
map. | [
"Removes",
"all",
"bindings",
"related",
"with",
"the",
"calendar",
"sources",
"and",
"visibility",
"map",
"."
] | f2b91c2622c3f29d004485b6426b23b86c331f96 | https://github.com/dlemmermann/CalendarFX/blob/f2b91c2622c3f29d004485b6426b23b86c331f96/CalendarFXView/src/main/java/com/calendarfx/view/print/PrintablePage.java#L738-L754 |
49,394 | dlemmermann/CalendarFX | CalendarFXView/src/main/java/com/calendarfx/view/print/PrintablePage.java | PrintablePage.createDetailedDayView | private DetailedDayView createDetailedDayView() {
DetailedDayView newDetailedDayView = new DetailedDayView();
newDetailedDayView.setShowScrollBar(false);
newDetailedDayView.setShowToday(false);
newDetailedDayView.setEnableCurrentTimeMarker(false);
newDetailedDayView.weekFieldsPro... | java | private DetailedDayView createDetailedDayView() {
DetailedDayView newDetailedDayView = new DetailedDayView();
newDetailedDayView.setShowScrollBar(false);
newDetailedDayView.setShowToday(false);
newDetailedDayView.setEnableCurrentTimeMarker(false);
newDetailedDayView.weekFieldsPro... | [
"private",
"DetailedDayView",
"createDetailedDayView",
"(",
")",
"{",
"DetailedDayView",
"newDetailedDayView",
"=",
"new",
"DetailedDayView",
"(",
")",
";",
"newDetailedDayView",
".",
"setShowScrollBar",
"(",
"false",
")",
";",
"newDetailedDayView",
".",
"setShowToday",... | Default configuration for Detailed Day view in the preview Pane.
@return | [
"Default",
"configuration",
"for",
"Detailed",
"Day",
"view",
"in",
"the",
"preview",
"Pane",
"."
] | f2b91c2622c3f29d004485b6426b23b86c331f96 | https://github.com/dlemmermann/CalendarFX/blob/f2b91c2622c3f29d004485b6426b23b86c331f96/CalendarFXView/src/main/java/com/calendarfx/view/print/PrintablePage.java#L772-L787 |
49,395 | dlemmermann/CalendarFX | CalendarFXView/src/main/java/com/calendarfx/view/print/PrintablePage.java | PrintablePage.configureDetailedDayView | protected void configureDetailedDayView(DetailedDayView newDetailedDayView,
boolean trimTimeBounds) {
newDetailedDayView.getDayView().setStartTime(LocalTime.MIN);
newDetailedDayView.getDayView().setEndTime(LocalTime.MAX);
newDetailedDayView.getDayView().setEarlyLateHoursStrategy(
... | java | protected void configureDetailedDayView(DetailedDayView newDetailedDayView,
boolean trimTimeBounds) {
newDetailedDayView.getDayView().setStartTime(LocalTime.MIN);
newDetailedDayView.getDayView().setEndTime(LocalTime.MAX);
newDetailedDayView.getDayView().setEarlyLateHoursStrategy(
... | [
"protected",
"void",
"configureDetailedDayView",
"(",
"DetailedDayView",
"newDetailedDayView",
",",
"boolean",
"trimTimeBounds",
")",
"{",
"newDetailedDayView",
".",
"getDayView",
"(",
")",
".",
"setStartTime",
"(",
"LocalTime",
".",
"MIN",
")",
";",
"newDetailedDayVi... | The idea of this method is to be able to change the default configuration
of the detailed day view in the preview pane.
Especially being able to show all the hours in the the print view
@param newDetailedDayView
view.
@param trimTimeBounds
define if trim or not the hours in the day view | [
"The",
"idea",
"of",
"this",
"method",
"is",
"to",
"be",
"able",
"to",
"change",
"the",
"default",
"configuration",
"of",
"the",
"detailed",
"day",
"view",
"in",
"the",
"preview",
"pane",
"."
] | f2b91c2622c3f29d004485b6426b23b86c331f96 | https://github.com/dlemmermann/CalendarFX/blob/f2b91c2622c3f29d004485b6426b23b86c331f96/CalendarFXView/src/main/java/com/calendarfx/view/print/PrintablePage.java#L800-L810 |
49,396 | dlemmermann/CalendarFX | CalendarFXView/src/main/java/com/calendarfx/view/print/PrintablePage.java | PrintablePage.createDetailedWeekView | private DetailedWeekView createDetailedWeekView() {
DetailedWeekView newDetailedWeekView = new DetailedWeekView();
newDetailedWeekView.setShowScrollBar(false);
newDetailedWeekView.layoutProperty().bind(layoutProperty());
newDetailedWeekView.setEnableCurrentTimeMarker(false);
newD... | java | private DetailedWeekView createDetailedWeekView() {
DetailedWeekView newDetailedWeekView = new DetailedWeekView();
newDetailedWeekView.setShowScrollBar(false);
newDetailedWeekView.layoutProperty().bind(layoutProperty());
newDetailedWeekView.setEnableCurrentTimeMarker(false);
newD... | [
"private",
"DetailedWeekView",
"createDetailedWeekView",
"(",
")",
"{",
"DetailedWeekView",
"newDetailedWeekView",
"=",
"new",
"DetailedWeekView",
"(",
")",
";",
"newDetailedWeekView",
".",
"setShowScrollBar",
"(",
"false",
")",
";",
"newDetailedWeekView",
".",
"layoutP... | Default configuration for Detailed Week view in the preview Pane.
@return | [
"Default",
"configuration",
"for",
"Detailed",
"Week",
"view",
"in",
"the",
"preview",
"Pane",
"."
] | f2b91c2622c3f29d004485b6426b23b86c331f96 | https://github.com/dlemmermann/CalendarFX/blob/f2b91c2622c3f29d004485b6426b23b86c331f96/CalendarFXView/src/main/java/com/calendarfx/view/print/PrintablePage.java#L817-L836 |
49,397 | dlemmermann/CalendarFX | CalendarFXView/src/main/java/com/calendarfx/view/print/PrintablePage.java | PrintablePage.configureDetailedWeekView | protected void configureDetailedWeekView(
DetailedWeekView newDetailedWeekView, boolean trimTimeBounds) {
newDetailedWeekView.getWeekView().setShowToday(false);
newDetailedWeekView.getWeekView().setTrimTimeBounds(trimTimeBounds);
} | java | protected void configureDetailedWeekView(
DetailedWeekView newDetailedWeekView, boolean trimTimeBounds) {
newDetailedWeekView.getWeekView().setShowToday(false);
newDetailedWeekView.getWeekView().setTrimTimeBounds(trimTimeBounds);
} | [
"protected",
"void",
"configureDetailedWeekView",
"(",
"DetailedWeekView",
"newDetailedWeekView",
",",
"boolean",
"trimTimeBounds",
")",
"{",
"newDetailedWeekView",
".",
"getWeekView",
"(",
")",
".",
"setShowToday",
"(",
"false",
")",
";",
"newDetailedWeekView",
".",
... | The idea of this method is to be able to change the default configuration
of the detailed week view in the preview pane.
Especially being able to show all the hours in the the print view
@param newDetailedWeekView
view.
@param trimTimeBounds
define if trim or not the hours in the week view | [
"The",
"idea",
"of",
"this",
"method",
"is",
"to",
"be",
"able",
"to",
"change",
"the",
"default",
"configuration",
"of",
"the",
"detailed",
"week",
"view",
"in",
"the",
"preview",
"pane",
"."
] | f2b91c2622c3f29d004485b6426b23b86c331f96 | https://github.com/dlemmermann/CalendarFX/blob/f2b91c2622c3f29d004485b6426b23b86c331f96/CalendarFXView/src/main/java/com/calendarfx/view/print/PrintablePage.java#L849-L853 |
49,398 | dlemmermann/CalendarFX | CalendarFXView/src/main/java/com/calendarfx/view/print/PrintablePage.java | PrintablePage.createMonthView | protected MonthView createMonthView() {
MonthView newMonthView = new MonthView();
newMonthView.setShowToday(false);
newMonthView.setShowCurrentWeek(false);
newMonthView.weekFieldsProperty().bind(weekFieldsProperty());
newMonthView.showFullDayEntriesProperty()
.bin... | java | protected MonthView createMonthView() {
MonthView newMonthView = new MonthView();
newMonthView.setShowToday(false);
newMonthView.setShowCurrentWeek(false);
newMonthView.weekFieldsProperty().bind(weekFieldsProperty());
newMonthView.showFullDayEntriesProperty()
.bin... | [
"protected",
"MonthView",
"createMonthView",
"(",
")",
"{",
"MonthView",
"newMonthView",
"=",
"new",
"MonthView",
"(",
")",
";",
"newMonthView",
".",
"setShowToday",
"(",
"false",
")",
";",
"newMonthView",
".",
"setShowCurrentWeek",
"(",
"false",
")",
";",
"ne... | Default configuration for Month view in the preview Pane.
@return | [
"Default",
"configuration",
"for",
"Month",
"view",
"in",
"the",
"preview",
"Pane",
"."
] | f2b91c2622c3f29d004485b6426b23b86c331f96 | https://github.com/dlemmermann/CalendarFX/blob/f2b91c2622c3f29d004485b6426b23b86c331f96/CalendarFXView/src/main/java/com/calendarfx/view/print/PrintablePage.java#L860-L872 |
49,399 | dlemmermann/CalendarFX | CalendarFXView/src/main/java/com/calendarfx/view/popover/EntryHeaderView.java | EntryHeaderView.getCalendar | public final Calendar getCalendar() {
Calendar calendar = calendarSelector.getCalendar();
if (calendar == null) {
calendar = entry.getCalendar();
}
return calendar;
} | java | public final Calendar getCalendar() {
Calendar calendar = calendarSelector.getCalendar();
if (calendar == null) {
calendar = entry.getCalendar();
}
return calendar;
} | [
"public",
"final",
"Calendar",
"getCalendar",
"(",
")",
"{",
"Calendar",
"calendar",
"=",
"calendarSelector",
".",
"getCalendar",
"(",
")",
";",
"if",
"(",
"calendar",
"==",
"null",
")",
"{",
"calendar",
"=",
"entry",
".",
"getCalendar",
"(",
")",
";",
"... | Returns the currently selected calendar.
@return the selected calendar | [
"Returns",
"the",
"currently",
"selected",
"calendar",
"."
] | f2b91c2622c3f29d004485b6426b23b86c331f96 | https://github.com/dlemmermann/CalendarFX/blob/f2b91c2622c3f29d004485b6426b23b86c331f96/CalendarFXView/src/main/java/com/calendarfx/view/popover/EntryHeaderView.java#L119-L126 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.