Skip to content

Commit 641f60c

Browse files
committed
license updates
1 parent a1262bf commit 641f60c

File tree

12 files changed

+153
-863
lines changed

12 files changed

+153
-863
lines changed

SwiftKitCore/src/main/java/org/swift/swiftkit/core/primitives/Converter.java

Lines changed: 0 additions & 606 deletions
This file was deleted.

SwiftKitCore/src/main/java/org/swift/swiftkit/core/primitives/Floats.java

Lines changed: 14 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,3 @@
1-
/*
2-
* Copyright (C) 2008 The Guava Authors
3-
*
4-
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
5-
* in compliance with the License. You may obtain a copy of the License at
6-
*
7-
* http://www.apache.org/licenses/LICENSE-2.0
8-
*
9-
* Unless required by applicable law or agreed to in writing, software distributed under the License
10-
* is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
11-
* or implied. See the License for the specific language governing permissions and limitations under
12-
* the License.
13-
*/
14-
151
//===----------------------------------------------------------------------===//
162
//
173
// This source file is part of the Swift.org open source project
@@ -26,6 +12,20 @@
2612
//
2713
//===----------------------------------------------------------------------===//
2814

15+
/*
16+
* Copyright (C) 2008 The Guava Authors
17+
*
18+
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
19+
* in compliance with the License. You may obtain a copy of the License at
20+
*
21+
* http://www.apache.org/licenses/LICENSE-2.0
22+
*
23+
* Unless required by applicable law or agreed to in writing, software distributed under the License
24+
* is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
25+
* or implied. See the License for the specific language governing permissions and limitations under
26+
* the License.
27+
*/
28+
2929
package org.swift.swiftkit.core.primitives;
3030

3131
import static org.swift.swiftkit.core.Preconditions.*;
@@ -290,42 +290,6 @@ private static int checkNoOverflow(long result) {
290290
return (int) result;
291291
}
292292

293-
private static final class FloatConverter extends Converter<String, Float>
294-
implements Serializable {
295-
static final Converter<String, Float> INSTANCE = new FloatConverter();
296-
297-
@Override
298-
protected Float doForward(String value) {
299-
return Float.valueOf(value);
300-
}
301-
302-
@Override
303-
protected String doBackward(Float value) {
304-
return value.toString();
305-
}
306-
307-
@Override
308-
public String toString() {
309-
return "Floats.stringConverter()";
310-
}
311-
312-
private Object readResolve() {
313-
return INSTANCE;
314-
}
315-
316-
private static final long serialVersionUID = 1;
317-
}
318-
319-
/**
320-
* Returns a serializable converter object that converts between strings and floats using {@link
321-
* Float#valueOf} and {@link Float#toString()}.
322-
*
323-
* @since 16.0
324-
*/
325-
public static Converter<String, Float> stringConverter() {
326-
return FloatConverter.INSTANCE;
327-
}
328-
329293
/**
330294
* Returns an array containing the same values as {@code array}, but guaranteed to be of a
331295
* specified minimum length. If {@code array} already has a length of at least {@code minLength},

SwiftKitCore/src/main/java/org/swift/swiftkit/core/primitives/Ints.java

Lines changed: 13 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,3 @@
1-
/*
2-
* Copyright (C) 2008 The Guava Authors
3-
*
4-
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
5-
* in compliance with the License. You may obtain a copy of the License at
6-
*
7-
* http://www.apache.org/licenses/LICENSE-2.0
8-
*
9-
* Unless required by applicable law or agreed to in writing, software distributed under the License
10-
* is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
11-
* or implied. See the License for the specific language governing permissions and limitations under
12-
* the License.
13-
*/
14-
151
//===----------------------------------------------------------------------===//
162
//
173
// This source file is part of the Swift.org open source project
@@ -26,6 +12,19 @@
2612
//
2713
//===----------------------------------------------------------------------===//
2814

15+
/*
16+
* Copyright (C) 2008 The Guava Authors
17+
*
18+
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
19+
* in compliance with the License. You may obtain a copy of the License at
20+
*
21+
* http://www.apache.org/licenses/LICENSE-2.0
22+
*
23+
* Unless required by applicable law or agreed to in writing, software distributed under the License
24+
* is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
25+
* or implied. See the License for the specific language governing permissions and limitations under
26+
* the License.
27+
*/
2928
package org.swift.swiftkit.core.primitives;
3029

3130
import static org.swift.swiftkit.core.Preconditions.*;
@@ -355,47 +354,6 @@ public static int fromBytes(byte b1, byte b2, byte b3, byte b4) {
355354
return b1 << 24 | (b2 & 0xFF) << 16 | (b3 & 0xFF) << 8 | (b4 & 0xFF);
356355
}
357356

358-
private static final class IntConverter extends Converter<String, Integer>
359-
implements Serializable {
360-
static final Converter<String, Integer> INSTANCE = new IntConverter();
361-
362-
@Override
363-
protected Integer doForward(String value) {
364-
return Integer.decode(value);
365-
}
366-
367-
@Override
368-
protected String doBackward(Integer value) {
369-
return value.toString();
370-
}
371-
372-
@Override
373-
public String toString() {
374-
return "Ints.stringConverter()";
375-
}
376-
377-
private Object readResolve() {
378-
return INSTANCE;
379-
}
380-
381-
private static final long serialVersionUID = 1;
382-
}
383-
384-
/**
385-
* Returns a serializable converter object that converts between strings and integers using {@link
386-
* Integer#decode} and {@link Integer#toString()}. The returned converter throws {@link
387-
* NumberFormatException} if the input string is invalid.
388-
*
389-
* <p><b>Warning:</b> please see {@link Integer#decode} to understand exactly how strings are
390-
* parsed. For example, the string {@code "0123"} is treated as <i>octal</i> and converted to the
391-
* value {@code 83}.
392-
*
393-
* @since 16.0
394-
*/
395-
public static Converter<String, Integer> stringConverter() {
396-
return IntConverter.INSTANCE;
397-
}
398-
399357
/**
400358
* Returns an array containing the same values as {@code array}, but guaranteed to be of a
401359
* specified minimum length. If {@code array} already has a length of at least {@code minLength},

SwiftKitCore/src/main/java/org/swift/swiftkit/core/primitives/Longs.java

Lines changed: 14 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,3 @@
1-
/*
2-
* Copyright (C) 2008 The Guava Authors
3-
*
4-
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
5-
* in compliance with the License. You may obtain a copy of the License at
6-
*
7-
* http://www.apache.org/licenses/LICENSE-2.0
8-
*
9-
* Unless required by applicable law or agreed to in writing, software distributed under the License
10-
* is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
11-
* or implied. See the License for the specific language governing permissions and limitations under
12-
* the License.
13-
*/
14-
151
//===----------------------------------------------------------------------===//
162
//
173
// This source file is part of the Swift.org open source project
@@ -26,6 +12,20 @@
2612
//
2713
//===----------------------------------------------------------------------===//
2814

15+
/*
16+
* Copyright (C) 2008 The Guava Authors
17+
*
18+
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
19+
* in compliance with the License. You may obtain a copy of the License at
20+
*
21+
* http://www.apache.org/licenses/LICENSE-2.0
22+
*
23+
* Unless required by applicable law or agreed to in writing, software distributed under the License
24+
* is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
25+
* or implied. See the License for the specific language governing permissions and limitations under
26+
* the License.
27+
*/
28+
2929
package org.swift.swiftkit.core.primitives;
3030

3131
import static org.swift.swiftkit.core.Preconditions.*;
@@ -442,46 +442,6 @@ static int digit(char c) {
442442
}
443443
}
444444

445-
private static final class LongConverter extends Converter<String, Long> implements Serializable {
446-
static final Converter<String, Long> INSTANCE = new LongConverter();
447-
448-
@Override
449-
protected Long doForward(String value) {
450-
return Long.decode(value);
451-
}
452-
453-
@Override
454-
protected String doBackward(Long value) {
455-
return value.toString();
456-
}
457-
458-
@Override
459-
public String toString() {
460-
return "Longs.stringConverter()";
461-
}
462-
463-
private Object readResolve() {
464-
return INSTANCE;
465-
}
466-
467-
private static final long serialVersionUID = 1;
468-
}
469-
470-
/**
471-
* Returns a serializable converter object that converts between strings and longs using {@link
472-
* Long#decode} and {@link Long#toString()}. The returned converter throws {@link
473-
* NumberFormatException} if the input string is invalid.
474-
*
475-
* <p><b>Warning:</b> please see {@link Long#decode} to understand exactly how strings are parsed.
476-
* For example, the string {@code "0123"} is treated as <i>octal</i> and converted to the value
477-
* {@code 83L}.
478-
*
479-
* @since 16.0
480-
*/
481-
public static Converter<String, Long> stringConverter() {
482-
return LongConverter.INSTANCE;
483-
}
484-
485445
/**
486446
* Returns an array containing the same values as {@code array}, but guaranteed to be of a
487447
* specified minimum length. If {@code array} already has a length of at least {@code minLength},

SwiftKitCore/src/main/java/org/swift/swiftkit/core/primitives/NullnessCasts.java

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,3 @@
1-
/*
2-
* Copyright (C) 2021 The Guava Authors
3-
*
4-
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
5-
* in compliance with the License. You may obtain a copy of the License at
6-
*
7-
* http://www.apache.org/licenses/LICENSE-2.0
8-
*
9-
* Unless required by applicable law or agreed to in writing, software distributed under the License
10-
* is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
11-
* or implied. See the License for the specific language governing permissions and limitations under
12-
* the License.
13-
*/
14-
151
//===----------------------------------------------------------------------===//
162
//
173
// This source file is part of the Swift.org open source project
@@ -26,6 +12,20 @@
2612
//
2713
//===----------------------------------------------------------------------===//
2814

15+
/*
16+
* Copyright (C) 2008 The Guava Authors
17+
*
18+
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
19+
* in compliance with the License. You may obtain a copy of the License at
20+
*
21+
* http://www.apache.org/licenses/LICENSE-2.0
22+
*
23+
* Unless required by applicable law or agreed to in writing, software distributed under the License
24+
* is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
25+
* or implied. See the License for the specific language governing permissions and limitations under
26+
* the License.
27+
*/
28+
2929
package org.swift.swiftkit.core.primitives;
3030

3131
import org.swift.swiftkit.core.annotations.Nullable;

SwiftKitCore/src/main/java/org/swift/swiftkit/core/primitives/UnsignedByte.java

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,3 @@
1-
/*
2-
* Copyright (C) 2011 The Guava Authors
3-
*
4-
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
5-
* in compliance with the License. You may obtain a copy of the License at
6-
*
7-
* http://www.apache.org/licenses/LICENSE-2.0
8-
*
9-
* Unless required by applicable law or agreed to in writing, software distributed under the License
10-
* is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
11-
* or implied. See the License for the specific language governing permissions and limitations under
12-
* the License.
13-
*/
14-
151
//===----------------------------------------------------------------------===//
162
//
173
// This source file is part of the Swift.org open source project
@@ -26,6 +12,20 @@
2612
//
2713
//===----------------------------------------------------------------------===//
2814

15+
/*
16+
* Copyright (C) 2008 The Guava Authors
17+
*
18+
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
19+
* in compliance with the License. You may obtain a copy of the License at
20+
*
21+
* http://www.apache.org/licenses/LICENSE-2.0
22+
*
23+
* Unless required by applicable law or agreed to in writing, software distributed under the License
24+
* is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
25+
* or implied. See the License for the specific language governing permissions and limitations under
26+
* the License.
27+
*/
28+
2929
package org.swift.swiftkit.core.primitives;
3030

3131
import org.swift.swiftkit.core.annotations.Nullable;

SwiftKitCore/src/main/java/org/swift/swiftkit/core/primitives/UnsignedBytes.java

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,3 @@
1-
/*
2-
* Copyright (C) 2009 The Guava Authors
3-
*
4-
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
5-
* in compliance with the License. You may obtain a copy of the License at
6-
*
7-
* http://www.apache.org/licenses/LICENSE-2.0
8-
*
9-
* Unless required by applicable law or agreed to in writing, software distributed under the License
10-
* is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
11-
* or implied. See the License for the specific language governing permissions and limitations under
12-
* the License.
13-
*/
14-
151
//===----------------------------------------------------------------------===//
162
//
173
// This source file is part of the Swift.org open source project
@@ -26,6 +12,20 @@
2612
//
2713
//===----------------------------------------------------------------------===//
2814

15+
/*
16+
* Copyright (C) 2008 The Guava Authors
17+
*
18+
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
19+
* in compliance with the License. You may obtain a copy of the License at
20+
*
21+
* http://www.apache.org/licenses/LICENSE-2.0
22+
*
23+
* Unless required by applicable law or agreed to in writing, software distributed under the License
24+
* is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
25+
* or implied. See the License for the specific language governing permissions and limitations under
26+
* the License.
27+
*/
28+
2929
package org.swift.swiftkit.core.primitives;
3030

3131
import static org.swift.swiftkit.core.Preconditions.*;

0 commit comments

Comments
 (0)