ADD week 5
This commit is contained in:
		
							
								
								
									
										137
									
								
								02-Easy5/E5/sources/kotlin/ranges/ULongProgression.java
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										137
									
								
								02-Easy5/E5/sources/kotlin/ranges/ULongProgression.java
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,137 @@ | ||||
| package kotlin.ranges; | ||||
|  | ||||
| import java.util.Iterator; | ||||
| import kotlin.Metadata; | ||||
| import kotlin.ULong; | ||||
| import kotlin.internal.UProgressionUtilKt; | ||||
| import kotlin.jvm.internal.DefaultConstructorMarker; | ||||
| import kotlin.jvm.internal.markers.KMappedMarker; | ||||
|  | ||||
| /* compiled from: ULongRange.kt */ | ||||
| @Metadata(d1 = {"\u0000:\n\u0002\u0018\u0002\n\u0002\u0010\u001c\n\u0002\u0018\u0002\n\u0002\b\u0003\n\u0002\u0010\t\n\u0002\b\t\n\u0002\u0010\u000b\n\u0000\n\u0002\u0010\u0000\n\u0000\n\u0002\u0010\b\n\u0002\b\u0002\n\u0002\u0010(\n\u0000\n\u0002\u0010\u000e\n\u0002\b\u0002\b\u0017\u0018\u0000 \u001a2\b\u0012\u0004\u0012\u00020\u00020\u0001:\u0001\u001aB\"\b\u0000\u0012\u0006\u0010\u0003\u001a\u00020\u0002\u0012\u0006\u0010\u0004\u001a\u00020\u0002\u0012\u0006\u0010\u0005\u001a\u00020\u0006ø\u0001\u0000¢\u0006\u0002\u0010\u0007J\u0013\u0010\u000f\u001a\u00020\u00102\b\u0010\u0011\u001a\u0004\u0018\u00010\u0012H\u0096\u0002J\b\u0010\u0013\u001a\u00020\u0014H\u0016J\b\u0010\u0015\u001a\u00020\u0010H\u0016J\u0012\u0010\u0016\u001a\b\u0012\u0004\u0012\u00020\u00020\u0017H\u0086\u0002ø\u0001\u0000J\b\u0010\u0018\u001a\u00020\u0019H\u0016R\u0019\u0010\b\u001a\u00020\u0002ø\u0001\u0000ø\u0001\u0001¢\u0006\n\n\u0002\u0010\u000b\u001a\u0004\b\t\u0010\nR\u0019\u0010\f\u001a\u00020\u0002ø\u0001\u0000ø\u0001\u0001¢\u0006\n\n\u0002\u0010\u000b\u001a\u0004\b\r\u0010\nR\u0011\u0010\u0005\u001a\u00020\u0006¢\u0006\b\n\u0000\u001a\u0004\b\u000e\u0010\nø\u0001\u0000\u0082\u0002\b\n\u0002\b\u0019\n\u0002\b!¨\u0006\u001b"}, d2 = {"Lkotlin/ranges/ULongProgression;", "", "Lkotlin/ULong;", "start", "endInclusive", "step", "", "(JJJLkotlin/jvm/internal/DefaultConstructorMarker;)V", "first", "getFirst-s-VKNKU", "()J", "J", "last", "getLast-s-VKNKU", "getStep", "equals", "", "other", "", "hashCode", "", "isEmpty", "iterator", "", "toString", "", "Companion", "kotlin-stdlib"}, k = 1, mv = {1, 8, 0}, xi = 48) | ||||
| /* loaded from: classes.dex */ | ||||
| public class ULongProgression implements Iterable<ULong>, KMappedMarker { | ||||
|  | ||||
|     /* renamed from: Companion, reason: from kotlin metadata */ | ||||
|     public static final Companion INSTANCE = new Companion(null); | ||||
|     private final long first; | ||||
|     private final long last; | ||||
|     private final long step; | ||||
|  | ||||
|     public /* synthetic */ ULongProgression(long j, long j2, long j3, DefaultConstructorMarker defaultConstructorMarker) { | ||||
|         this(j, j2, j3); | ||||
|     } | ||||
|  | ||||
|     /* renamed from: getFirst-s-VKNKU, reason: not valid java name and from getter */ | ||||
|     public final long getFirst() { | ||||
|         return this.first; | ||||
|     } | ||||
|  | ||||
|     /* renamed from: getLast-s-VKNKU, reason: not valid java name and from getter */ | ||||
|     public final long getLast() { | ||||
|         return this.last; | ||||
|     } | ||||
|  | ||||
|     public final long getStep() { | ||||
|         return this.step; | ||||
|     } | ||||
|  | ||||
|     private ULongProgression(long j, long j2, long j3) { | ||||
|         if (j3 == 0) { | ||||
|             throw new IllegalArgumentException("Step must be non-zero."); | ||||
|         } | ||||
|         if (j3 == Long.MIN_VALUE) { | ||||
|             throw new IllegalArgumentException("Step must be greater than Long.MIN_VALUE to avoid overflow on negation."); | ||||
|         } | ||||
|         this.first = j; | ||||
|         this.last = UProgressionUtilKt.m1509getProgressionLastElement7ftBX0g(j, j2, j3); | ||||
|         this.step = j3; | ||||
|     } | ||||
|  | ||||
|     @Override // java.lang.Iterable | ||||
|     public final Iterator<ULong> iterator() { | ||||
|         return new ULongProgressionIterator(this.first, this.last, this.step, null); | ||||
|     } | ||||
|  | ||||
|     public boolean isEmpty() { | ||||
|         int compare; | ||||
|         int compare2; | ||||
|         long j = this.step; | ||||
|         long j2 = this.first; | ||||
|         long j3 = this.last; | ||||
|         if (j > 0) { | ||||
|             compare2 = Long.compare(j2 ^ Long.MIN_VALUE, j3 ^ Long.MIN_VALUE); | ||||
|             if (compare2 > 0) { | ||||
|                 return true; | ||||
|             } | ||||
|         } else { | ||||
|             compare = Long.compare(j2 ^ Long.MIN_VALUE, j3 ^ Long.MIN_VALUE); | ||||
|             if (compare < 0) { | ||||
|                 return true; | ||||
|             } | ||||
|         } | ||||
|         return false; | ||||
|     } | ||||
|  | ||||
|     public boolean equals(Object other) { | ||||
|         if (other instanceof ULongProgression) { | ||||
|             if (!isEmpty() || !((ULongProgression) other).isEmpty()) { | ||||
|                 ULongProgression uLongProgression = (ULongProgression) other; | ||||
|                 if (this.first != uLongProgression.first || this.last != uLongProgression.last || this.step != uLongProgression.step) { | ||||
|                 } | ||||
|             } | ||||
|             return true; | ||||
|         } | ||||
|         return false; | ||||
|     } | ||||
|  | ||||
|     public int hashCode() { | ||||
|         if (isEmpty()) { | ||||
|             return -1; | ||||
|         } | ||||
|         long j = this.first; | ||||
|         int m463constructorimpl = ((int) ULong.m463constructorimpl(j ^ ULong.m463constructorimpl(j >>> 32))) * 31; | ||||
|         long j2 = this.last; | ||||
|         int m463constructorimpl2 = (m463constructorimpl + ((int) ULong.m463constructorimpl(j2 ^ ULong.m463constructorimpl(j2 >>> 32)))) * 31; | ||||
|         long j3 = this.step; | ||||
|         return ((int) (j3 ^ (j3 >>> 32))) + m463constructorimpl2; | ||||
|     } | ||||
|  | ||||
|     public String toString() { | ||||
|         StringBuilder sb; | ||||
|         long j; | ||||
|         if (this.step > 0) { | ||||
|             sb = new StringBuilder(); | ||||
|             sb.append((Object) ULong.m509toStringimpl(this.first)); | ||||
|             sb.append(".."); | ||||
|             sb.append((Object) ULong.m509toStringimpl(this.last)); | ||||
|             sb.append(" step "); | ||||
|             j = this.step; | ||||
|         } else { | ||||
|             sb = new StringBuilder(); | ||||
|             sb.append((Object) ULong.m509toStringimpl(this.first)); | ||||
|             sb.append(" downTo "); | ||||
|             sb.append((Object) ULong.m509toStringimpl(this.last)); | ||||
|             sb.append(" step "); | ||||
|             j = -this.step; | ||||
|         } | ||||
|         sb.append(j); | ||||
|         return sb.toString(); | ||||
|     } | ||||
|  | ||||
|     /* compiled from: ULongRange.kt */ | ||||
|     @Metadata(d1 = {"\u0000\"\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0010\t\n\u0002\b\u0003\b\u0086\u0003\u0018\u00002\u00020\u0001B\u0007\b\u0002¢\u0006\u0002\u0010\u0002J(\u0010\u0003\u001a\u00020\u00042\u0006\u0010\u0005\u001a\u00020\u00062\u0006\u0010\u0007\u001a\u00020\u00062\u0006\u0010\b\u001a\u00020\tø\u0001\u0000¢\u0006\u0004\b\n\u0010\u000b\u0082\u0002\u0004\n\u0002\b\u0019¨\u0006\f"}, d2 = {"Lkotlin/ranges/ULongProgression$Companion;", "", "()V", "fromClosedRange", "Lkotlin/ranges/ULongProgression;", "rangeStart", "Lkotlin/ULong;", "rangeEnd", "step", "", "fromClosedRange-7ftBX0g", "(JJJ)Lkotlin/ranges/ULongProgression;", "kotlin-stdlib"}, k = 1, mv = {1, 8, 0}, xi = 48) | ||||
|     public static final class Companion { | ||||
|         public /* synthetic */ Companion(DefaultConstructorMarker defaultConstructorMarker) { | ||||
|             this(); | ||||
|         } | ||||
|  | ||||
|         private Companion() { | ||||
|         } | ||||
|  | ||||
|         /* renamed from: fromClosedRange-7ftBX0g, reason: not valid java name */ | ||||
|         public final ULongProgression m1559fromClosedRange7ftBX0g(long rangeStart, long rangeEnd, long step) { | ||||
|             return new ULongProgression(rangeStart, rangeEnd, step, null); | ||||
|         } | ||||
|     } | ||||
| } | ||||
		Reference in New Issue
	
	Block a user